in reply to search for blank lines by RegEx
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search for blank lines by RegEx
by Aragorn (Curate) on Sep 07, 2004 at 09:02 UTC | |
by Anonymous Monk on Sep 07, 2004 at 10:47 UTC | |
by robharper (Pilgrim) on Sep 07, 2004 at 15:41 UTC |