Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Match string in array

by JediWizard (Deacon)
on Oct 03, 2005 at 19:10 UTC ( [id://497025]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://497025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found