Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: size of an array ref

by jethro (Monsignor)
on Feb 24, 2012 at 16:49 UTC ( #955954=note: print w/ replies, xml ) Need Help??


in reply to Re: size of an array ref
in thread size of an array ref

Sorry to disappoint you but the curly braces do not dereference, @{a} is equivalent to @a. The curly braces only allow more complicated constructs with unambiguous precedence, for example ${$a[3]}[4] versus ${$a}[3][4]. If you want dereference, @{$a} or simply @$a is the right choice.

Update: Thanks to choroba and SuicideJunkie for spotting a $ where a @ should have been


Comment on Re^2: size of an array ref
Select or Download Code
Re^3: size of an array ref
by swampyankee (Parson) on Feb 25, 2012 at 01:01 UTC

    Insert random cursing here. I should have kept my virtual mouth shut.


    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2014-07-28 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (205 votes), past polls