in reply to how to next line after the pattern in perl

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
Perl 6 - links to (nearly) everything that is Perl 6.