Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Help with arrays

by MidLifeXis (Prior)
on Sep 24, 2012 at 13:05 UTC ( #995372=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Help with arrays
in thread Help with arrays

I think what you want is $size = $#nums;
Probably not. $#nums is the index of the last item in the array @nums. In the usual case, that is one less than scalar(@nums), which gives you the size of the @nums array, not the index of the last element.

--MidLifeXis


Comment on Re^5: Help with arrays
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-09-20 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (158 votes), past polls