Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Compare two arrays

by almut (Canon)
on Apr 02, 2009 at 10:52 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found