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

Re: Get values from array

by Anonymous Monk
on Apr 22, 2014 at 04:09 UTC ( #1083101=note: print w/replies, xml ) Need Help??


in reply to Get values from array

Or you could use a for loop with a map instead of nested for loops:

sub process { my %run_all = %{ shift(@_) }; foreach my $key ( keys %run_all ) { print "$key\n", map { join( "\t" => @$_{ (qw[name reference]) } ), $/ } @{ $run_all{$key} } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1083101]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2016-12-10 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (164 votes). Check out past polls.