Help for this page

Select Code to Download


  1. or download this
    @arr = map {qr/\Q$_\E/} @arr;
    my @keepers = do {
        local $" = '|';
        grep { m/@arr/ } <>;
    };
    
  2. or download this
    my (%hsh, @keepers);
    @hsh{@arr} = ();
    while (<>) {
        push @keepers, $_ if grep {exists $hsh{$_}} split;
    }