in reply to move down 2 lines in file?
In case you want to get rid of the $_ = <FILE>, you could also write something like
my $skip_n = 0; while (<FILE>) { next if $skip_n && $skip_n--; if (/blah/) { $skip_n = 2; # schedule the skipping of two lines } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: move down 2 lines in file?
by ruzam (Curate) on Jul 12, 2008 at 17:42 UTC | |
|
Re^2: move down 2 lines in file?
by bibliophile (Prior) on Jul 14, 2008 at 15:52 UTC |