|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re^2: trim leading & trailing whitespaceby thinker (Parson) |
| on Mar 30, 2005 at 10:04 UTC ( #443390=note: print w/ replies, xml ) | Need Help?? |
|
Hi bart In the example I gave above, s/^\s*(.*?)\s*$/$1/gmthe combination of the \m modifier, and the line anchors ^ and $ will ensure the newlines are left alone cheers thinker
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||