in reply to Re^2: trim leading & trailing whitespace
in thread trim leading & trailing whitespace
Result:$_ = " no \n \n \n they \n \n won't \n\n\n"; s/^\s*(.*?)\s*$/$1/gm; print;
no they won't
All blank lines are gone.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: trim leading & trailing whitespace
by thinker (Parson) on Mar 30, 2005 at 10:33 UTC | |
Re^4: trim leading & trailing whitespace
by tlm (Prior) on Mar 30, 2005 at 10:41 UTC | |
by bart (Canon) on Mar 30, 2005 at 11:10 UTC |