in reply to Parsing a text file

Not that it will solve your problem, but I think you want your print outside of your "while" loop.

Have you tried pre-processing your csv file using the dos2unix utility to clean up the nasty ^M's?

Replies are listed 'Best First'.
Re^2: Parsing a text file
by calmthestorm (Acolyte) on Jan 14, 2009 at 01:52 UTC
    Nope, don't want to print anything actually. I put a $verbose variable in there to turn on messages but for the most part,we want this to run silent. (until it breaks)

    as for preprocessing to get rid of the ^M's, that is a thought but I hate to call external (possibly missing) programs to do something that perl can/should handle natively.

      You can preprocess it easily with perl:

      shell$ perl -pe 'tr/\r/\n/' infile > outfile