However there is a trap for the unwary here. If the value you are testing may legitimately evaluate to false, your default value will be spuriously assigned.
That's solved by using the defined-or operator "//" that's new in perl 5.10. However, because it's so new it's probably not a good idea to use it yet for anything you upload to the CPAN :-)
In reply to Re^2: what is sub {1;}
by DrHyde
in thread what is sub {1;}
by mlgvalt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |