- or download this
$fred == 42 ? $config = 'k1' : $config = 'k2';
- or download this
my $config = $fred == 42 ? 'k1' : 'k2';
- or download this
# weird1.pl
use strict;
...
print "fred='$fred'\n";
$fred == 42 ? $config = 'k1' : $config = 'k2';
print "config='$config'\n";
- or download this
perl weird1.pl 42
- or download this
fred='42'
config='k2'
- or download this
perl weird1.pl 69
- or download this
fred='69'
config='k2'
- or download this
$fred == 42 ? $config = 'k1' : $config = 'k2';