I agree, the logic can be usefully simplified here. But your suggested change is not correct. With the negations unwound, the equivalent logic is:
if (defined $name and defined $sysoid) { $lookup{$name}{name} = $name; $lookup{$name}{sysoid} = $sysoid; }
(But I would normally use the higher-precedence && in this situation in preference to the lower-precedence and, which I tend to reserve for control flow.)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^2: Compare two hash values for a match
by Athanasius
in thread Compare two hash values for a match
by vlad3848
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |