Help for this page

Select Code to Download


  1. or download this
    push( @{ $y{ ($a = $_, ( grep {$a=~/$_/} @t )[0] || next)[1] } }, $_ )
    + for @f;
    
  2. or download this
    use strict;
    my @t=qw(one two three);
    ...
    my %y;
    
    push( @{ $y{ ($a = $_, ( grep {$a=~/\b$_\.ind/} @t )[0] || next)[1] } 
    +}, $_ ) for @f;
    
  3. or download this
    for my $f (@f) {
        my ($t) = grep {$f=~/$_/} @t;
        next unless $t;
        push( @{ $y{ $t } }, $f );
    }