Darkwing99, when you refer to "real LF" it makes me twitch. There is no such thing as a fake LF, hence no real LF neither. You problem is due to the fact that platform handle newlines differently (I guess you figured that out by now). In binary there is no such thing as a newline...
For clarity's sake...
unix: \n
win: \r\n
mac: \r
thendal, I don't know why it didn't replace the newlines on the remote server but I do know that the code s/\n/'***'/g will replace any newlines to '***'. If it didn't substitute it's because of something else. A perl program should be...
well, that's very ugly. Nothing to laugh at if you want my opinion. To read a single dir use the readdir() function. If you need to traverse a tree use the File::Find module. for a regex that matches 8 digits use /^\d{8}\..*$/.
Good luck!
I have a fair idea of what the problem is. By now it's clear that the problem is in the script that transfers the files. It does something to those files that cause them to just hang if you try to run them. So, my question was if those files beeing transfered were execuables (binaries), and...
When you open a file (or do any external operation) it's wise to check if it succeeded. What if for some reason the file your script tries to open suddenly disappears? You just can't have your script continue executing as if nothing was wrong. So in other words always check the status and...
I'm sorry but it's not being clear to me what kind of apps you are transfering. Are those apps binaries? i.e. .exe files? If so then make sure you set the file handle to binmode when reading the file and trasnfering the file. BTW, did you write that trasfering perl script yourself?
In my previous message I said "I understand the part that it's the script that transfer that has problems but rather the script being transfered." but meant "I understand the part that it's not the script that transfer that has problems but rather the script being transfered."
ok... again. "The retreived application will not run." is no more useful than "The application then won't run." What is the error? I understand the part that it's the script that transfer that has problems but rather the script being transfered. Start transferring small...
"The application then won't run." is not very helpful to us. You ought to get some kind of errors, which would be a lot more useful to us. Also, to find out if the problem is in the transfer or has to do with the box itself simply chekc what the script looks like once transfered on...
I rarely walk back the tree using "..". It's prone to some errors. It's better with the full path IMHO. What is the status of your open statement if you check thr $! variable?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.