Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Accessing and array of hashes

by Anonymous Monk
on Nov 26, 2014 at 15:15 UTC ( [id://1108464]=note: print w/replies, xml ) Need Help??


in reply to Re: Accessing and array of hashes
in thread Accessing and array of hashes

I need to access all of them, and it might be more them one block of the same key, so if I print:
print $print_data->[0]{name}
it prints 45 occurrences but with the same value.

Replies are listed 'Best First'.
Re^3: Accessing and array of hashes
by Anonymous Monk on Nov 26, 2014 at 18:16 UTC
    Need to use a loop:
    foreach my $detail (@{$test_data}){ my $name = $detail->{name}; print "$name\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found