If you are searching for blank lines in order to capture the data between them, then you might consider using paragraph mode. This should give you an idea of how to go about it:
{ local $/ = ''; while (<>) { print "Data block No. $.:"; foreach my $line (split /^/m) { line_func($line); } } }
See this perl.com article which discusses paragraph mode, $/, $. and other special variables.
Regards,
PN5
In reply to Re: search for blank lines by RegEx
by Prior Nacre V
in thread search for blank lines by RegEx
by mosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |