Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Answer: How cand I find each dimension x,y,z of a 3D arrays

by Velaki (Chaplain)
on Sep 29, 2004 at 17:33 UTC ( #395071=note: print w/replies, xml ) Need Help??


in reply to Re: How cand I find each dimension x,y,z of a 3D arrays
in thread How cand I find each dimension x,y,z of a 3D arrays

Just curious, but couldn't this be accomplished with

$#{$array_to_count{$index}}+1
as well, instead of using the while loop?

That way the code would be

sub getSecondArraySize { # receives the argument my ($index, %array_to_count) = @_; # return the count return $#{$array_to_count{$index}}+1; }
Thoughts,
-v
"Perl. There is no substitute."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2021-04-11 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?