Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying a search program on a delimited txt file and get the following error message. Does anyone know what's it mean? ERROR:Maybe you didn't strip carriage returns after a network transfer? Thanks, Molly

Replies are listed 'Best First'.
Re: Strip Carriage Returns
by chromatic (Archbishop) on Sep 02, 2000 at 06:26 UTC
    If you've written your file on a Windows system and ftp'd it to a Unix system in binary mode, the line endings wouldn't be converted properly. perldiag on your machine might have more information -- on mine, it suggests the error message might be "Illegal character %s (carriage return)".

    If you can open the file in vi, you might try the command ":set ff=unix". Or see Remove the ^M Character from a Document.

Re: Strip Carriage Returns
by davorg (Chancellor) on Sep 02, 2000 at 20:36 UTC
Re: Strip Carriage Returns
by Adam (Vicar) on Sep 02, 2000 at 05:37 UTC
    *Nix systems and MOS systems use different EOL markers.