in reply to [OT] Number of seconds from epoch

Just in case you're too lazy to split up your date string into something that Time::Local can handle, and don't mind slurping in 240k of Perl code, you could also use the module Date::Manip

#!/usr/bin/perl use Date::Manip qw(UnixDate); my $time_new = 'Tue Feb 13 19:04:04 IST 2007'; my $time = UnixDate($time_new, "%s"); print "secs since the Epoch: $time\n"; # prints 1171373644

Replies are listed 'Best First'.
Re^2: [OT] Number of seconds from epoch
by sanPerl (Friar) on Feb 13, 2007 at 15:43 UTC
    Thanks a lot to everyone, for wonderful suggestions.