more useful options | |
PerlMonks |
Re: remove blank lines with regexby Biker (Priest) |
on May 21, 2002 at 13:18 UTC ( [id://168113]=note: print w/replies, xml ) | Need Help?? |
Consider this:
I always come back to the following: Do not slurp in a file into an array. Someday that input file will be huge. And that will happen when used for production data. And you're on vacation. And you'll have to come in to the office during that sunny day on the beach. Read the input file line by line and act upon each line (here by potentially writing it to the output file.) Everything went worng, just as foreseen.
In Section
Seekers of Perl Wisdom
|
|