in reply to Searching for variable then blank lines
my ($s, $b); foreach my $line (@lines) { if ($line =~ /^\n$/i) { $b++; last if (($b == 2) && $s); } else { $b = 0; } if ($line =~ /^$arc/) { $s = 'true'; } if ($s) { print OUTPUT $line; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Searching for variable then blank lines
by rscott212 (Sexton) on Mar 14, 2002 at 05:29 UTC | |
by tstock (Curate) on Mar 14, 2002 at 05:54 UTC |