Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: trim the blank lines...regexby wade (Pilgrim) |
on Apr 11, 2008 at 19:37 UTC ( [id://679828]=note: print w/replies, xml ) | Need Help?? |
I'm a little afraid of answering this 'cause it looks a bit like homework. That said... The first question I have is "how did you get the string in the first place?" The answer to this might present a better solution (e.g., don't concatenate blank lines to $str in the firs place). To answer your original question, though:
-- Wade
In Section
Seekers of Perl Wisdom
|
|