if (exists $locs{$loc}) { # do something... } else { die "key $loc does not exist"; }
Update: I should have read mscharrer's node more closely, as this was already mentioned. But, I provided the link to the docs, so I guess this is not completely redundant.
In reply to Re: pulling value based on input
by toolic
in thread pulling value based on input
by kwn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |