in reply to FTPing

This isn't actually a Perl question. It's a question about operating system differences, and how text is represented on different platforms.

On some platforms text lines end in \012. In others, lines end in \015\012. And in others, lines end in \015. If you transfer files in "binary mode", line endings are not converted as you transfer across operating system platforms. If you transfer in text mode, line endings should be converted automatically.

Perl scripts are text files, not binary files. So if you want your Perl scripts to be transferred with the proper line endings, you use text mode when transferring them. Or, as an alternative, you can transfer them in whatever mode you please and then use the "dos2unix" or the "unix2dos" utilities to convert the line endings after the fact.

Again, this has nothing to do with Perl itself other than the fact that you can wreck a Perl script by failing to convert the line endings. In particular, people often notice that shebang lines stop working if the line endings aren't converted.


Dave

Replies are listed 'Best First'.
Re^2: FTPing
by pikus (Hermit) on Jul 11, 2004 at 17:53 UTC
    Thanks.
         - pikus
    "I want to live 'till I die. No more. No less." - Eddie Izzard