landau351 has asked for the wisdom of the Perl Monks concerning the following question:
# # /usr/local/lib/perl5/5.6.1/sun4-solaris # $msgFile = "./data/err-PHY-opt.dat"; ($msgFile =~ /\-opt.dat$/) ? $optsFile = 1 : $optsFile = 0; print "optsFile = " . $optsFile . "\n"; if ($msgFile =~ /\-opt.dat$/) { $optsFile = 1; } else { $optsFile = 0; } print "optsFile = " . $optsFile . "\n";
janitored by ybiC: Balanced <code> tags around codeblock, as per Monastery convention
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ?: conditional operators appear to fail
by Zaxo (Archbishop) on Aug 24, 2004 at 04:18 UTC | |
by landau351 (Initiate) on Aug 24, 2004 at 04:33 UTC | |
|
Re: ?: conditional operators appear to fail
by tachyon (Chancellor) on Aug 24, 2004 at 05:38 UTC | |
|
Re: ?: conditional operators appear to fail
by bart (Canon) on Aug 24, 2004 at 09:25 UTC | |
|
Re: ?: conditional operators appear to fail
by Fletch (Bishop) on Aug 24, 2004 at 15:34 UTC | |
|
Re: ?: conditional operators appear to fail
by shenme (Priest) on Aug 24, 2004 at 20:59 UTC |