(A useful trick I have put to good use in the past.)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]; } } } }
In reply to Re (tilly) 2: hash initialisation
by tilly
in thread hash initialisation
by agoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |