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

Re: Combining arrays with grep/unless?

by davidrw (Prior)
on Feb 10, 2007 at 04:42 UTC ( [id://599324]=note: print w/replies, xml ) Need Help??


in reply to Combining arrays with grep/unless?

didn't see this type of solution in this thread yet, so here goes:
my @group1 = ('A','B','C','D','E'); my @group2 = ('F','G','H','I','J'); my @group1 = sort keys %{{map {$_ => 1} @group1, @group2}};
Note that the sort is optional, but otherwise the order will be random.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-20 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found