in reply to Array of hashes misbehaving?
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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Array of hashes misbehaving?
by Dr. Mu (Hermit) on May 23, 2012 at 22:57 UTC |