What wouldAnd the smartass who would say otherwise looks at the last expression evaluated, and hence would only print "Hello", as print returns 1, I'd like to point that in such a case:do?print "Hello"; otherwise print "world";
will both assign 0 to $x, and print "foo" - as the assignment to $x is the last expression evaluated.$x = 0 if 3 > 2; print "foo" otherwise;
In reply to Re^3: Useless unless
by Anonymous Monk
in thread Useless unless
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |