sub f { length or $_ = "default value" for my $var = shift; do_something_with($var); }