$time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2}) (AM|PM)$/
or die "unparsable time: $time"; #maybe we shouldn't die...
my $hour = $1;
$time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2}) (AM|PM)$/
or die "unparsable time: $time"; #maybe we shouldn't die...
my $hour = $1;