Technically, the no-explicit-return version of the function returns 0 for an empty argument list
I am aware of that, but they are relying undefined behaviour to do so[1], and it's a poor value to return.
I infer that the OP did the if(@_) just to prevent divide-by-zero.
That would actually have been a far better outcome!
In reply to Re^4: resetting a foreach loop!
by ikegami
in thread resetting a foreach loop!
by lunette
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |