Note that this assumes your %access hash does not contain boolean false values, as your initial solution did. To actually check for the presence of these keys in the hash, the exists function will help.$level = $access{$item} || $item =~ /^([^:]+):/ && $access{"$1:*"} || $access{'*'} || 0;
In reply to Re: Tidy up conditions
by martin
in thread Tidy up conditions
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |