in reply to chomp not working

Hi

If you're passing files back and forth between *nix and windows, it may be that the end-of-lines are messed up.

Have you tried dos2unix?

Best of luck!

Heatseeker Cannibal

Replies are listed 'Best First'.
Re^2: chomp not working (resolved)
by djbryson (Beadle) on Dec 07, 2007 at 20:05 UTC
    I think I know why the chomp wasn't working. chomp removes the newline character from the end of the string. My file was all 1 string... so it's only removing the last newline char, not the new line chars throughout.
    solution: $content =~ s/\r\n//g;
    Thanks guys