my %month = (
Jan => 0,
Feb => 1,
...
);
# ...
$month = $month{$month}; # Could stand to use better names
####
open(LOGFILE, "datafile.html") || die "Can't open file";
####
foreach my $log_line ()
{
# ...
}
####
my $hour = param ("hour");
my $minute = param ("minute");