in reply to Re^2: How to create a hash whose values are undef?
in thread How to create a hash whose values are undef?
The LHS is a slice, on the RHS the value, 0, is in parentheses which generates a list, the @keys is used in scalar context to get the correct number of values.my %hash; @hash{@keys} = (0) x @keys;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to create a hash whose values are undef?
by Marshall (Canon) on Jul 06, 2009 at 12:11 UTC | |
by cdarke (Prior) on Jul 07, 2009 at 07:36 UTC |