in reply to hash of hash of hash of hash of hash...
Just a couple minor notes:
Example:
#!/usr/bin/perl -w use warnings; use strict; my %topHash; # (1) Perl automatically creates the hash table entries as needed # (2) The undef value will be treated as zero, so the result of this # statement is that $topHash{77}{15}{Feb} is 1 ++$topHash{77}{15}{Feb}; for my $k1 (keys %topHash) { for my $k2 (keys %{$topHash{$k1}}) { for my $k3 (keys %{$topHash{$k1}{$k2}}) { print "$k1 / $k2 / $k3 : '$topHash{$k1}{$k2}{$k3}\n"; } } }
So you can simplify the first chunk of your code to:
... while (<FILE>) { my $line=$_; (my $day,$month,$year,$hour,$minute) = ( $line =~ /^.*\[(\d*)\/(.*) +\/(\d*):(\d*):(\d*).*$/); ++$topHash{$year}{$month}{$day}{$hour}{$minute}; } close(FILE);
...roboticus
|
|---|