Or the two-step approach:my $foo = exists($description{$input}) ? $description{$input} : "default value";
my $foo = $description{$input}; $foo = "default value" if (!defined($foo));
In reply to Re: Default Hash Key
by wade
in thread Default Hash Key
by tford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |