Help for this page

Select Code to Download


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