in reply to Removing white-lines...

Since it looks like you're tidying up html, perhaps HTML::Tidy could be of help to you.

Also, perl -p -i -e ' s/^\s+//; s/[^\S\n]+$//;' *.shtml will do as you ask.

perlrun tells more on these

and the -e does these things

s/^\s+//; # strip leading whitespace s/[^\S\n]+$//; # strip trailing whitespace

I'm not sure which part of this is removing the all whitespace lines but it does appear to be happening <_<

Update ofcourse! the all-whitespace lines (including thier \n) is being removed by the first regex!

@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Update to make a little more sense