Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Getting values from hash

by Anonymous Monk
on Apr 26, 2012 at 14:20 UTC ( [id://967365]=note: print w/replies, xml ) Need Help??


in reply to Getting values from hash

$result is not a hash reference. It's an array reference, note the outermost square brackets. Access first the array index, then the hash key, thus:
for my $search (@{ $result->[0]{trends} })

Replies are listed 'Best First'.
Re^2: Getting values from hash
by danny0085 (Sexton) on Apr 26, 2012 at 14:28 UTC

    Thank you so much, it worked fine.

    Every day I learn a bit more about perl thanks to gurus like you :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-03-19 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found