Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: size of an array ref

by TomDLux (Vicar)
on Feb 27, 2012 at 19:49 UTC ( #956505=note: print w/replies, xml ) Need Help??


in reply to size of an array ref

@a is an array. The first element of @a is $a[0], which stores a reference to an array of three elements. You can extract the inner array using @{ $a[0] }. Unlike the other suggestions, this works for the (fictional) array stored in $a[1] or other positions, and it can be extended for the third-level, fourth-level, etc.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://956505]
help
Chatterbox?
[huck]: erix some things also write to the raw console/tty/pty rather than stdout/stderr
[Discipulus]: see this useful site
[erix]: hm. ok. Either might be the case here. I guess I need to try out more
[choroba]: The redirections seem to happen right to left
[choroba]: but gurus say they in fact happen left to right, but we understand them wrongly
[marioroy]: bad gurus :)
[choroba]: also, &> redirects both at the same time

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-03-23 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (284 votes). Check out past polls.