[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] words words words



>   #!perl -n
> 
>   BEGIN {
>     open T, "threes";
>     chop(@t=<T>);
>     @t{@t} = (1) x @t;
>   }
>   grep {!$t{$_}} /(...)/g or print;

I expect this is slightly faster (same number of chars):

 #!perl -n
 
 BEGIN {
   open T, "threes";
   chop(@t=<T>);
   @t{@t} = ();
 }
 grep {!exists$t{$_}} /(...)/g or print;




==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe