Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: size of an array ref

by fionbarr (Friar)
on Feb 24, 2012 at 13:00 UTC ( #955910=note: print w/replies, xml ) Need Help??


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

that makes sense...I might have a reference to a reference to an array...I've tried a lot of permutations and not gotten '3'...is it possible to get the size of a ref to a ref?

Replies are listed 'Best First'.
Re^3: size of an array ref
by JavaFan (Canon) on Feb 24, 2012 at 13:24 UTC
    @array; @$arrayref; @$$arrayrefref; @$$$arrayrefrefref; @$$$$arrayrefrefrefref; @$$$$$arrayrefrefrefrefref; @$$$$$$arrayrefrefrefrefrefref; ... etc ...
Re^3: size of an array ref
by brx (Pilgrim) on Feb 24, 2012 at 21:12 UTC
    $a= [1..10];$b=\$a;$c=\$b; $d=\$c;$e=\$d; $e=$$e while (ref($e) eq "REF"); print scalar @$e;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2019-06-24 13:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (98 votes). Check out past polls.

    Notices?