in reply to chomp - reference

This may be a wild stab, but I've seen it happen before. If you take a file created in Windows and transfer it to unix, it can add extra newlines, and if you're only chomping once, you're only getting the last \n from your data. Have you tried printing your raw data before processing to verify what it looks like?

It's a simple thing, but sometimes its overlooked. I didn't catch that anyone had mentioned it, so I wanted to throw that out there.

Replies are listed 'Best First'.
Re^2: chomp - reference
by michaelp (Initiate) on Jun 05, 2010 at 22:50 UTC
    Thanks again for all the help! The lines ended in \r\n, so a substitution did the trick. Cheers, Michael