in reply to Re: Taking a subset of a hash
in thread [Answered!] Taking a subset of a hash

Sorry if I forgot to mention that $config was a reference.

Doesn't defined $config{ $_ } && $config{ $_ } have the same truth value as $config{ $_ }?

Replies are listed 'Best First'.
Re^3: Taking a subset of a hash
by BrowserUk (Patriarch) on Oct 30, 2010 at 13:59 UTC
    Doesn't defined $config{ $_ } && $config{ $_ } have the same truth value as $config{ $_ }?

    Yes. I was attempting to capture your stated requirements:

    but omits them if their configured value is false, undefined, or nonexistent.

    and got it wrong. It should be:

    exists $config{ $_ } && $config{ $_ }

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.