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.
In reply to Re^4: Help with arrays
by 2teez
in thread Help with arrays
by perlguru22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |