>>>>> "JC" == Justin C <> writes:
JC> OK, I see the error of my ways. The bottom line, I think, to get the
JC> result you expect, is to always use parens for that type of statement.
nope. the bottom line is that you shouldn't do side effects with ?:. its
purpose is to return a value selected by a boolean test. the key word is
'return'. since perl allows side effects in expressions you are allowed
to put them inside ?: but it is very bad practice even if you use
parens. it is bypassing the purpose of the operator. if you want side
effects based upon a boolean, use if/else statements.
uri
--
Uri Guttman ------
--------
http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training ---
http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ----
http://bestfriendscocoa.com ---------