in reply to trim leading & trailing whitespace
Multiline, huh? You mean you want to trim every line independently?
I don't use \s because I want to leave the newlines alone.s/^[\t\ ]+//gm; s/[\t\ ]+$//gm;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: trim leading & trailing whitespace
by thinker (Parson) on Mar 30, 2005 at 10:04 UTC | |
by bart (Canon) on Mar 30, 2005 at 10:08 UTC | |
by thinker (Parson) on Mar 30, 2005 at 10:33 UTC | |
by tlm (Prior) on Mar 30, 2005 at 10:41 UTC | |
by bart (Canon) on Mar 30, 2005 at 11:10 UTC |
In Section
Seekers of Perl Wisdom