in reply to skipping lines when parsing a file

Hi !

1st : next what ? on line 6 of your code sample: You are not in a loop.

To skip a block of lines, between 2 regexes, skipping the lines with the regexes too, I should write :

my $inBlock = 0; while(<$in>) { if ($inBlock) { $inBlock = 0 if ( $_ =~ /2nd Regex/); } else { $inBlock = 1 if ( $_ =~ /1st Regex/); print $_ if(!$inBlock); } }
Hope it helps (not tested!)