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.
In reply to Re^3: trim leading & trailing whitespace
by bart
in thread trim leading & trailing whitespace
by ady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |