in reply to Re: Wanting Validation for Smacking my Sysadmin (500 error problem)
in thread Wanting Validation for Smacking my Sysadmin (500 error problem)

Cool, I'm about to learn something....

What are the differences between UNIX and DOS line endings? Every line ends with a semicolon, of course. I used ASCII when I transfered the file. What's the difference between the two? How do I make sure I'm using the right one?

Thanks.
  • Comment on Re: Wanting Validation for Smacking my Sysadmin (500 error problem)

Replies are listed 'Best First'.
Re: Re: Wanting Validation for Smacking my Sysadmin (500 error problem)
by dda (Friar) on Jan 23, 2003 at 12:35 UTC
    Every line in DOS text file ends with "0D0A" sequence, while UNIX file contains only "0A" at the end of each line. You can check it with 'od' command:

    od -t x filename.pl

    --dda

      Should od be bundled with Perl? It's not available from my command prompt in Dos and when I PuTTY into the server.

      Google came back with some nice french poetry and a few metal fabricators :~)
        od (Octal Dump) should be bundled with any unix. It is not related to perl. And in DOS (Windows) you can use FAR manager (www.rarsoft.com) to view files in HEX mode (it has a lot of nice other features).

        --dda