in reply to flip-flop operator and sequence number

To use the sequence counter, I guess you'd use something like this:

foreach ( @data ) { my $seq = /start/ .. /stop/; next unless $seq > 1 && substr($seq, -2) ne 'E0'; # do_stuff }

Not tested, but you get the idea...

--bwana147