print "$months{$2}/$1/2015" if $ugly_date =~ /([0-3]?[[0-9]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) .*/ # Returns 8/19/2015>