Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: Effecicncy of key-only hash

by massa (Hermit)
on Aug 25, 2008 at 11:39 UTC ( [id://706664]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Effecicncy of key-only hash
in thread Effecicncy of key-only hash

AFAIK, a hash slice is considered an array and not a list... that's why it begins with '@' :-)
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^6: Effecicncy of key-only hash
by ysth (Canon) on Aug 25, 2008 at 13:17 UTC
    perldata:
    If you’re confused about why you use an ’@’ there on a hash slice instead of a ’%’, think of it like this. The type of bracket (square or curly) governs whether it’s an array or a hash being looked at. On the other hand, the leading symbol (’$’ or ’@’) on the array or hash indicates whether you are getting back a singular value (a scalar) or a plural one (a list).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found