my $variable = $test ? $value : 0;