Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Code Works But Not Sure How (updated)

by RichHamilton (Novice)
on Feb 11, 2018 at 13:31 UTC ( [id://1208955]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Code Works But Not Sure How (updated)
in thread Code Works But Not Sure How

Thanks again I'll look over the debugging checklist. I hadn't tried the foreach loop yet, since I wasn't sure how to access it. I was look at it strictly as {$menu_items = []}.
  • Comment on Re^4: Code Works But Not Sure How (updated)

Replies are listed 'Best First'.
Re^5: Code Works But Not Sure How
by haukex (Archbishop) on Feb 11, 2018 at 15:14 UTC
    I wasn't sure how to access it. I was look at it strictly as {$menu_items = []}.

    Have a look at perlreftut (and for details, perlref): An array reference can always be dereferenced with @{...}, so in this case foreach my $item ( @{ $items->{menu_items} } ).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found