Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Match string in array

by JediWizard (Deacon)
on Oct 03, 2005 at 19:10 UTC ( #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
Node Status?
node history
Node Type: note [id://497025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2021-06-19 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (91 votes). Check out past polls.

    Notices?