in reply to Re^2: Useless unless
in thread Useless unless
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Useless unless
by jdporter (Paladin) on Aug 08, 2005 at 17:20 UTC |