http://www.perlmonks.org?node_id=192417


in reply to Computing Oracle date format from a date string

Do you mean like this?

$format = 'DY MON DD ... '; # default $format = 'YYYY-MM-DD ... ' if $date =~ /^\d/; # begins with number