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};
In reply to Re: Hash slice to get DB values - include undefined values?
by mortis
in thread Hash slice to get DB values - include undefined values?
by George_Sherston
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |