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

Re: [FWP] Wanted - Have = Need



John Carter wrote:
> 
> I have a file full of things I have and a file full of things I want, and
> I want a list of things I still need to build (that which is in the wanted
> list but not the have list.)
> 
> open( HAVE, "have");
> %Have = map {$_=>1} <HAVE>;
> close HAVE;
> open( WANTED, "wanted");
> print grep { !exists( $Have{$_})} <WANTED>;
> close WANTED;

fgrep -v -f have wanted

-- 
John Porter


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