Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Not understanding the arrow operator

by DStaal (Chaplain)
on May 18, 2009 at 20:05 UTC ( [id://764718]=note: print w/replies, xml ) Need Help??


in reply to Not understanding the arrow operator

You are dereferencing: You have an array of hashes (or, more correctly an array of references to hashes) in @pages, so $_ in the map is a reference to a hash.

This is partially hidden by the normal syntax, because perl is smart enough to realise when you type $pages[1]{id} you mean $pages[1]->{id}. (Because there is no other way element 1 of @pages could be a hash: Arrays can only hold scalars, and they only way to get a hash into a scalar is to use a reference.)

Log In?
Username:
Password:

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

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

    No recent polls found