c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le
"my $aref = [ 6, 7, 1, 6, 8, 9, 7, 2, 6, 98, 99, 7, 3, 7, 4, 6, 5, ];
dd $aref;
;;
my @copy;
$_ == 6 .. $_ == 7 or push @copy, $_ for @$aref;
;;
dd \@copy;
"
[6, 7, 1, 6, 8, 9, 7, 2, 6, 98, 99, 7, 3, 7, 4, 6, 5]
[1, 2, 3, 7, 4]
What's supposed to happen if a "start" code for an exclusion sequence is seen, but no corresponding "stop" code is ever seen? My assumption was that no exclusion would happen. I expected
[6, 7, 1, 6, 8, 9, 7, 2, 6, 98, 99, 7, 3, 7, 4, 6, 5]
to yield
[1, 2, 3, 7, 4, 6, 5]
Give a man a fish: <%-{-{-{-<