If I were to use map, I wouldn't use
my @hashes = map { {} } 0..9; $hashes[$_]{$_} = 1 for 0..9;
I would use
my @hashes = map { { $_ => 1 } } 0..9;
In reply to Re: Array of hashes misbehaving?
by ikegami
in thread Array of hashes misbehaving?
by Dr. Mu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |