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

Re: [FWP] Wanted - Have = Need



Jeff Pinyan wrote:
> 
> On Oct 13, John Carter said:
> 
> >open( HAVE, "have");
> >%Have = map {$_=>1} <HAVE>;
> >close HAVE;
> >open( WANTED, "wanted");
> >print grep { !exists( $Have{$_})} <WANTED>;
> >close WANTED;
> 
>   perl -e 'do{$w{<>}=1}until+eof;delete@w{<>};print+keys%w' WANT HAVE

It's not perl and not that much fun but if you want to do this, the
easiest way I've seen is

uniq -u WANT HAVE HAVE

Fergal

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