- or download this
my @x;
while (/(?=((\d)(\d)))/g) {
push @x, $1 if $3 > $2;
}
- or download this
my %ok;
for my $i (1..8) {
...
}
my @x = grep $ok{$_}, /(?=(\d\d))/g;
- or download this
use Regexp::List qw( );
...
my $re = Regexp::List->new()->list2re(@ok);
my @x = /(?=($re))/g;
- or download this
my @x;
push @x, $1 while /(?=((\d)(\d)(?(?{ $3 <= $2 })(?!))))/g;