Perl: the Markov chain saw | |
PerlMonks |
Re: Strip line feeds from fileby cbro (Pilgrim) |
on Jun 09, 2003 at 20:20 UTC ( [id://264451]=note: print w/replies, xml ) | Need Help?? |
Make a perl script (yourscript.pl) that contains the line: Then run: against your file...say file.txt. That is how you edit a file in-place. You will have your old file as file.txt.tmp to do a comparison and confirm it worked if you want. You could also do this for each line if you read the file into an array. That is...
Update: Well, it seems I was a little slow on the typing, other than the other posts do not contain the '\f'. You may have wanted to include this as a reply on your last post cuz now that one is going to get unneeded attention.
In Section
Seekers of Perl Wisdom
|
|