I'm pretty sure chomp only works on a single line...
I'm definitely sure that reading the entire file into a single variable isn't waht you want (particularly if you want to chomp). I would read it line by line and while(<$in>) { chomp } if I were you.
But if you must slurp the entire file into a var (which is fine when the files are small), then I would probably choose something like $entire_file =~ s/[\r\n]//sg.
-Paul
In reply to Re: remove line break from 1 line
by jettero
in thread remove line break from 1 line
by djbryson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |