Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Merging Arrays without duplicates

by Mr_Person (Hermit)
on Aug 18, 2004 at 15:25 UTC ( [id://383997]=note: print w/replies, xml ) Need Help??


in reply to Merging Arrays without duplicates

And just for fun, here's another way to do it using Tie::Array::Unique.
use Tie::Array::Unique; my @a = (0,1,2,3,4,5,6,7); my @b = (3,4,5,6,7,8,9,10); tie my(@merged), 'Tie::Array::Unique', (@a,@b); print join(',', @merged);
Will output 0,1,2,3,4,5,6,7,8,9,10.

Log In?
Username:
Password:

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

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

    No recent polls found