$num = shift;
at the beginning of the subroutine, and then say things like
if ($num == 0){
That way you're testing the actual contents of the array. (Also note that the $num inside the subroutine is not the same variable as the $num outside the subroutine; although in this case they will always have the same value.)
TheEnigma
In reply to Re: Subroutine Behaviour
by TheEnigma
in thread Subroutine Behaviour
by dReKurCe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |