Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Do you know where your variables are?
 
PerlMonks  

Re: compare two arrays

by nagalenoj (Friar)
on Dec 15, 2008 at 09:28 UTC ( #730378=note: print w/ replies, xml ) Need Help??


in reply to compare two arrays

Dear monk,

We can also do like the below,

my @a=(1,2,4,5,3); my @b=(1,2,4,2,3); my @c = map { $a[$_] <=> $b[$_] ? 0 : 1 } 0 .. $#a; print @c;


Comment on Re: compare two arrays
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2014-04-21 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (497 votes), past polls