in reply to flip-flop operator and sequence number

Hello, You can put real code into the grep so that it looks this this. That way you can access the sequence number you are refering to. The sequence counter is not visible because grep just uses whether the block evaluates to true or false for the list value (I think!)
#!/usr/bin/perl -w use strict; my @data=(<DATA>); foreach (grep { my $sequence_number=/START/ .. /STOP/; $sequence_numbe +r ne 1 and $sequence_number !~ /E0/ and $sequence_number;} @data ) { chomp; print "$_ Between START and STOP\n"; } __END__ START Sausage Mash Mushy Peas STOP Monkey Nuts START Bananas Custard STOP Tarzan