Syntactic Confectionery Delight | |
PerlMonks |
Re: remove blank lines with regexby broquaint (Abbot) |
on May 21, 2002 at 12:52 UTC ( [id://168103]=note: print w/replies, xml ) | Need Help?? |
Try adding the s modifier to the regex match in the while loop. Also you might want to use $/ instead of a literal \n as it's more portable. Although this code should do the job without having to loop through the string.
HTH
_________
In Section
Seekers of Perl Wisdom
|
|