Help for this page

Select Code to Download


  1. or download this
    use constant REGEXP => qr(a);
    print grep { REGEXP } qw(a b c);
    
  2. or download this
    my @tmp;
    foreach (qw(a b c)) {
       push @tmp, $_ if qr(a);
    }
    print @tmp;
    
  3. or download this
    print grep { $_ =~ REGEXP } @list;