Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: merging anonymous arrays

by davido (Cardinal)
on Nov 16, 2012 at 08:29 UTC ( [id://1004149]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $a_ref = [ qw/ A B C D E F G H / ];
    my $b_ref = [ qw/ 7 6 5 4 3 2 1 0 / ];
    
    my @KEY = map { $a_ref->[$_], $b_ref->[$_] } 0 .. $#{$a_ref};
    
  2. or download this
    use List::MoreUtils qw( zip );
    
    ...
    my $b_ref = [ qw/ 7 6 5 4 3 2 1 0 / ];
    
    my @KEY = zip @{$a_ref}, @{$b_ref};
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found