Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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} } } }


Comment on Re: Get values from array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-03 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls