I need to convert dates like Jul 09 2012 05:59:59 to YYYY-MM-DD HH24:MI:SS format.
Constraints:
I prefer if I don't have to write the whole thing myself which I would do as a last resort.
I prefer not to use modules.
If a module is required, it would be better to use a more common module so that the code doesn't break on most machines.
Ozo, please explain what you are doing in the second line? Making an hash or array? How?
ozo
@m{qw(Jan Feb Mar ... )} is a shorthand for
($m{Jan},$m{Feb},$m{Mar},...)
('01'..'12') is a shorthand for
('01','02','03',...)
so the entire assignment is a shorthand for
$m{Jan}='01'; $m{Feb}='02'; $m{Mar}='03'; ...
(the first 3 ... above are not the perl ... operator)
Ozo, please explain what you are doing in the second line? Making an hash or array? How?