in reply to Re: Compare two hash values for a match
in thread Compare two hash values for a match

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,

Replies are listed 'Best First'.
Re^3: Compare two hash values for a match
by builat (Monk) on Oct 13, 2013 at 11:51 UTC
    Yes. Right. My mistake. Shame on me.