Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Taking a subset of a hash

by Narveson (Chaplain)
on Oct 30, 2010 at 13:28 UTC ( [id://868472]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://868472]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found