my ($month, $day, $year) = $line =~ / (Jan|Mar|Dec) # the month abbreviations we want \s+ # followed by one or more spaces (\d+) # then one or more digits \s+ # then one or more spaces (\d+) # then one or more digits /x;