/^\s+$/ or /\s+$/ matches one or more whitespace characters; neither will match an empty line, i.e., one consisting solely of a newline (as would a line printed by print "\n";) won't be matched.
emc
Insisting on perfect safety is for people who don't have the balls to live in the real world.
In reply to Re^3: removing empty lines
by swampyankee
in thread removing empty lines
by mikejones
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |