Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 avoiding work at the Monastery: (8)
As of 2017-11-22 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (326 votes). Check out past polls.

    Notices?