in reply to Aaaarghh...hashes of hashes..again :(
Not pertinent to your problem (and I note that you no longer initialise the hashes anyway) but you could save yourself some typing by using map and sprintf to do the work. Your
my %G01totals = ( '01' => 0, '02' => 0, '03' => 0, '04' => 0, '05' => 0, '06' => 0, +'07' => 0, '08' => 0, '09' => 0, '10' => 0, '11' => 0, '12' => 0, '13' => 0, +'14' => 0, '15' => 0, '16' => 0, '17' => 0, '18' => 0, '19' => 0, '20' => 0, +'21' => 0, );
could be written
my %G01totals = map { sprintf( q{%02d}, $_ ) => 0 } 1 .. 21;
I hope this might be useful in the future.
Cheers,
JohnGG
|
|---|