in reply to Converting to epoch time.

TASdvlper,
Take a look at Time::Local. If you are sure your data is rigidly formatted as you describe, a simple regex and that module is all you need.
#!/usr/bin/perl use strict; use warnings; use Time::Local; print scalar localtime( epoch( '2005-03-28 12:00:00' ) ); sub epoch { my $stamp = shift; my($yr, $mon, $day, $hr, $min, $sec) = split /[ :-]/, $stamp; --$mon; return timelocal($sec, $min, $hr, $day, $mon, $yr); }

Cheers - L~R

Added code snippet after initial post