in reply to Re^2: resetting a foreach loop!
in thread resetting a foreach loop!
++Indeed. Technically, the no-explicit-return version of the function returns 0 for an empty argument list, so it implictly handles the empty case. (I infer that the OP did the if(@_) just to prevent divide-by-zero.) But I agree that explicit undef is a better return value than relying on a default 0.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: resetting a foreach loop!
by ikegami (Patriarch) on Nov 17, 2017 at 20:00 UTC | |
by AnomalousMonk (Archbishop) on Nov 17, 2017 at 20:15 UTC | |
by ikegami (Patriarch) on Nov 18, 2017 at 00:07 UTC | |
by AnomalousMonk (Archbishop) on Nov 18, 2017 at 00:43 UTC | |
by pryrt (Abbot) on Nov 18, 2017 at 02:11 UTC | |
|