Help for this page

Select Code to Download


  1. or download this
     ...
     my @nums = 1 .. 30;
     my $reg = qr{^(\d+)$ (??{ $1 % 3 ? '(?!)' : '' })}x;
     print join ',', grep /$reg/, @nums;
     ...
    
  2. or download this
     ...
     my $reg = qr{ ^((?>\d+)) (??{ !!($1 % 3) and '(?!)' }) }x;
     ...