Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: why ^M are added while iam transfering file using binary in Net::FTP

by DentArthurDent (Monk)
on Sep 12, 2006 at 18:30 UTC ( #572593=note: print w/ replies, xml ) Need Help??


in reply to why ^M are added while iam transfering file using binary in Net::FTP

Here's how it should work as I understand it:

For ASCII mode, your line endings will be translated if possible. From UNIX to Windows, ^M (carriage return) characters are added. From Windows to UNIX they are removed, I believe. For binary mode, none of that translation is done.

So for true text files, often you really want to use ascii mode. However, for just about anything else, you really want binary. You can really pull you hair out if you transfer a linux executable through a windows box back to linux if you use ASCII in one of the transfers.

Bottom line: Think carefully, and be consistent!

----
My mission: To boldy split infinitives that have never been split before!


Comment on Re: why ^M are added while iam transfering file using binary in Net::FTP

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://572593]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-08-23 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls