or download this
$line = "On January 1 1970 the unix epoch commenced.";
my @months = qw(
...
my $months = join "|", @months;
my ($month, $day, $year) = $line =~ m/((?:$months)\w+)\s+(\d+)\s+(\d+)
+/i;
print "month\t$month\nday \t$day\nyear\t$year\n";