- or download this
my $smallest = 1e308;
$smallest = $smallest < $_ ? $smallest : $_ for @array;
- or download this
# Not a good example, but demonstrates the point
$latest = $latest > time() ? $latest : time();
- or download this
# This would be the same as a straight assignment, but '!=' is just a
+placeholder for a.n. other comparison operation.
my $temp = function_with_side_effects();
$state = $state != $temp ? $temp : $state;
- or download this
my $smallest = 1e308;
$smallest ?<:= $_ for @array;
$latest ?>:= time;
- or download this
$lvalue ?<:= $rvalue;
$lvalue ?>:= $rvalue;
...
$lvalue ?gt:= $rvalue;
$lvalue ?ge:= $rvalue;
$lvalue ?le:= $rvalue;