in reply to
Re^2: newlines in regular expressions
in thread
newlines in regular expressions
perl -pi -e 's/^\s*\z//' file.txt
deals with blank lines with other whitespace.
Comment on
Re^3: newlines in regular expressions
Download
Code
In Section
Seekers of Perl Wisdom