print $t if (my $t = shift); # Fails. my $t = shift; print $t if $t; # Ok. if (my $t = shift) { print $t; } # Ok.