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 } }
In reply to Re: move down 2 lines in file?
by almut
in thread move down 2 lines in file?
by annie06
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |