in reply to how to next line after the pattern in perl
use strict; use warnings; my $flag = 0; while (<DATA>) { if (/XXXX/) { $flag = 1; } elsif ($flag) { print; $flag = 0; } } __DATA__ ZZZZZZZZZZZZ YYYYY XXXX XX XXXX 3333 ii XXXX asdfddd
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to next line after the pattern in perl
by kennethk (Abbot) on Jun 09, 2010 at 19:22 UTC | |
by ww (Archbishop) on Jun 09, 2010 at 19:41 UTC | |
by kennethk (Abbot) on Jun 09, 2010 at 20:03 UTC |