in reply to Re: hash initialisation
in thread hash initialisation

If performance matters then temporaries may be your friend. For instance the following should run several times faster than your code:
foreach my $month ('02'..'03') { my $m_bucket = $bucket{$month} = {}; foreach my $day ('00' .. $mons{$month}) { my $d_bucket = $m_bucket->{$day} = {}; foreach my $hour ('00'..'23') { my $h_bucket = $d_bucket->{$hour} = {}; foreach my $minute ('00'..'59') { $h_bucket->{$minute} = [0,0]; } } } }
(A useful trick I have put to good use in the past.)