This will set $Temp to 'undefined' if &Func returns a false value (see What is true and false in Perl? for more details). I like the original code, methinks. It's just what the ternary operator was designed to do.
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In reply to Re: Re: Safe to use ternary operator like this?
by arturo
in thread Safe to use ternary operator like this?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |