Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Hash slice to get DB values - include undefined values?

by mortis (Pilgrim)
on Dec 11, 2001 at 19:49 UTC ( [id://130951]=note: print w/replies, xml ) Need Help??


in reply to Hash slice to get DB values - include undefined values?

I only know how to do what you're asking in 2 steps. I usualy do something similar to:
$g{$_} ||= undef for @cols; my @vals = @g{@cols};
I'd stick with undef since you're using a database. IIRC, undef translates to NULL to indicate the absence of a value, while 0 is a value.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found