in reply to [Solved]Need to extract a particular block of lines between two patterns
Use the return value of the flip-flop:
my $count; while (<$fh_r>) { if (my $status = /START/ .. /END/) { $count++ if $status == 1; print if $count == 2; } }
In Section
Seekers of Perl Wisdom