Perl: the Markov chain saw | |
PerlMonks |
Re: Tidy up conditionsby martin (Friar) |
on Mar 18, 2015 at 23:49 UTC ( [id://1120520]=note: print w/replies, xml ) | Need Help?? |
You could use the short-cut behaviour of boolean operators like this:
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.
In Section
Seekers of Perl Wisdom
|
|