$date =~ s/(\d{4})(\d{2})(\d{2})/$1-$2-$3/; [download]
In reply to Re: formatting dates by Roger in thread formatting dates by Anonymous Monk