>>>>> "AP" == Aristoteles Pagaltzis <pagaltzis@xxxxxx> writes:
AP> * Smylers <Smylers@xxxxxxxxxxx> [2002-09-30 14:19]:
>> #! /usr/bin/perl -00p
>> __END__
AP> You also don't need to write a script for that:
AP> $ perl -00pe1 filename
AP> would do. However, it doesn't fulfill the spec of regarding
AP> lines with only whitespace as empty.
untested but looks ok:
perl -0777pe 's/^\s*\n/\n/m' file
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
|