I am on Perl 5.8 and am needing to assign a default value. I ended up doing this:
if ($model->test) { $review = \"1\" } else { $review = \'\' }
I'd usually write this as:
$review = ( defined($model->test) ? 1 : '' );
where the parentheses are for clarity for other people reading the code.