my $var;
if($cond) {
$var = 'this';
} else {
$var = 'that';
}
####
my $var = $cond ? 'this' : 'that';
##
##
$var = $var ? 'this' : 'that';
##
##
$value = $value * 5;
$next = $next + 1;
##
##
$value *= 5;
$next++;
##
##
$result = build_shed(
logs => 24,
(screws => 120) x!! @screwdrivers,
(nails => 360) x!! @hammers,
);
##
##
my %materials = (logs => 24);
$materials{screws} = 120 if @screwdrivers;
$materiasl{nails} = 360 if @hammers;
$result = build_shed(%materials);
##
##
$var = $var ? 'this' : 'that';
##
##
$var ?= 'this' : 'that';