http://qs321.pair.com?node_id=497025


in reply to Match string in array

my(%listA) =(); @listA{'one','red','orange','brown','green','blue','scarlett','fourte +en'} = (); my(@listB) = ('red','orange','yellow','green','blue','indigo','violet' +); foreach my $check (@listB){ print "$check\n" if(! exists($listA{$check})); } __END__ # Output: yellow indigo violet

They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Replies are listed 'Best First'.
Re^2: Match string in array
by nimdokk (Vicar) on Oct 03, 2005 at 19:29 UTC
    ++ Thanks, thats exactly what I needed.