in reply to Strip line feeds from file
I doubt you really want to do it the way you describe ... removing all the \n before doign anything else. Much better to process one line at a time, unless you really need access tot he whole file.
open FILE, "<", $filename; while(<FILE>) { chomp; # mode processing goes here }
|
|---|