What about the more obvious following?
sub test{ my $p1 = shift || 1; [...]
In reply to Re^2: Correct idiom for default parameters
by Anonymous Monk
in thread Correct idiom for default parameters
by mrider
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |