Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Help with arrays

by 2teez (Priest)
on Sep 22, 2012 at 04:53 UTC ( #995038=note: print w/ replies, xml ) Need Help??


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

It works when I put elements in the @nums but I am just confused on the unknown length part.
ofcourse, the array  @nums = () is empty.
unknown length doesn't mean EMPTY array, does it?

Infact, your code will die with an error message, illegal division by zero at ... because the variable $size will be 0 since the array is empty.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re^4: 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://995038]
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 2015-07-01 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls