Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Compare two arrays

by almut (Canon)
on Apr 02, 2009 at 10:52 UTC ( #754912=note: print w/replies, xml ) Need Help??


in reply to Compare two arrays

...also, you've swapped $i and $j, i.e. for $i(0.. $#array1), but then $array2[$i]  (doesn't really matter in this particular case, but it would, if the arrays were of different size).

It's not entirely clear what you want to achieve. The "this1 belongs to h8this13" in your expected output looks like you would want to do substring matching, but then, the match "this2 belongs to h5this21", which you consider unfortunate, suggests you might not...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2022-08-18 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?