My naiive approach (I'm a newbie) would be to check two lines in a row, something like...
my $prev; while (<DATA>) { if (/^\s*$/ && $prev =~ /^\s*$/) { # Two blank lines in a row found } $prev = $_; }
It doesn't look a particularly Perl way to do it though, so I guess my inexperience is showing.
In reply to Re: search for blank lines by RegEx
by robharper
in thread search for blank lines by RegEx
by mosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |