Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl --
    # filter.pl
    ...
    
    print $_->[0] foreach grep {$seen{$_->[1]} < 2} @ary;
    
  2. or download this
    #!/usr/bin/perl -n
    /[fr] /, $s{$`.$'}++ || push @a, [$_,$`.$'] }{ $s{$_->[1]}<2 && print 
    +$_->[0] for @a
    
  3. or download this
    #!/usr/bin/perl -n
    /f|r/,$s{$`.$'}++,push@a,[$_,$`.$']}{$s{$$_[1]}<2&&print$$_[0]for@a