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

Re: Having trouble reading in a hash from a referenced array

by dave_the_m (Monsignor)
on Dec 18, 2020 at 09:01 UTC ( #11125397=note: print w/replies, xml ) Need Help??


in reply to Having trouble reading in a hash from a referenced array

AT a guess, you need to replace this:
my @newarray = $narray->{"movie_results"};
with this:
my @newarray = @{$narray->{"movie_results"}};
The first sets $newarray[0] to the same array ref contained in the "movie_results" slot of the hash; the second dereferences that array ref and returns all the elements in that array.

Dave.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-01-20 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (56 votes). Check out past polls.

    Notices?