Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Get values from array

by chilledham (Pilgrim)
on Apr 21, 2014 at 19:55 UTC ( #1083078=note: print w/ replies, xml ) Need Help??


in reply to Get values from array

You are seeing HASH(0x28c0af8) because $entry is a reference to a hash. Notice the curly braces around the key-value pairs in your data structure:

{ 'name' => 'JOSPH', 'reference' => '0gft5210', }

You'll want to deference that inner hash.

sub process { my $all = shift; my %run_all = %$all; foreach my $key (keys %run_all){ print "$key\n"; foreach my $entry (@{$run_all{$key}}) { while (my ($k, $v) = each %$entry) { print "$k => $v\n"; } } print "\n"; } }


Comment on Re: Get values from array
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2015-07-30 08:31 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 (270 votes), past polls