in reply to Re^2: "last expression" quiz
in thread "last expression" quiz
Judging by your results on the warnings, or rather the lack of them, I think the subs return false, thus, !1. That is both equal to "" and numerically equal to 0 without a warning.
Oh, and a 1 is allowed to be used as a statement without warning. Typical use for them is in a bodyless loop:
as well as as the last statement in a required file/module. Hence that there's no warning for a bare 1;.1 while COND;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: "last expression" quiz
by Aristotle (Chancellor) on Oct 19, 2005 at 22:32 UTC | |
by sauoq (Abbot) on Oct 19, 2005 at 22:36 UTC | |
by japhy (Canon) on Oct 19, 2005 at 23:12 UTC | |
by Aristotle (Chancellor) on Oct 19, 2005 at 22:42 UTC | |
by chromatic (Archbishop) on Oct 20, 2005 at 06:46 UTC | |
by Aristotle (Chancellor) on Oct 21, 2005 at 10:22 UTC | |
|
Re^4: "last expression" quiz
by Aristotle (Chancellor) on Oct 19, 2005 at 22:58 UTC | |
|
Re^4: "last expression" quiz
by sauoq (Abbot) on Oct 19, 2005 at 22:44 UTC | |
by bart (Canon) on Oct 19, 2005 at 22:48 UTC |