in reply to Compare two hash values for a match

Why you do not use?
unless ((defined $name) or (defined $sysoid)){..}

Replies are listed 'Best First'.
Re^2: Compare two hash values for a match
by Athanasius (Archbishop) on Oct 13, 2013 at 11:36 UTC

    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,

      Yes. Right. My mistake. Shame on me.