Low-tech solution which just uses a variable to indicate if the next line should be printed:
use warnings; use strict; my $print_next; while (<DATA>) { print if $print_next; $print_next = /XXXX/; } __DATA__ ZZZZZZZZZZZZ YYYYY XXXX XX XXXX 3333 ii XXXX asdfddd
In reply to Re: how to print next line after the pattern in perl
by moritz
in thread how to next line after the pattern in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |