in reply to Hash slice to get DB values - include undefined values?
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.$g{$_} ||= undef for @cols; my @vals = @g{@cols};
|
|---|