in reply to How to convert time stamp to unix time ?

In the FAQ from Date::Time: How Do I Convert between Epoch Times and DateTime Objects?

It can be as easy as:

use DateTime; $dt = DateTime->new( year => 2010, month => 2, day => 3, hour => 8, minute => 15, second => 0, nanosecond => 0, time_zone => 'UTC', ); print $dt->epoch;
Output: 1265184900

Parsing your input string is left as an exercise for the reader.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James