in reply to Finding time difference from two strings

I'd go for Time::Local -- it's simple and direct: convert each string to "seconds since the epoch" and subtract. The only downside is having to relate month names to numbers.
use Time::Local; my $beginning = 'Thu Oct 24 17:37:58 2007'; my $end = 'Fri Oct 26 06:54:09 2007'; my %month = ( Jan => 0, Feb => 1, Mar => 2, Apr => 3, May => 4, Jun => 5, Jul => 6, Aug => 7, Sep => 8, Oct => 9, Nov => 10, Dec => 11 ); for ( $beginning, $end ) { my ( $mo, $dy, $hr, $mi, $se, $yr ) = ( split /[\s:]/ )[1..6]; $mo = $month{$mo}; $_ = timelocal( $se, $mi, $hr, $dy, $mo, $yr ); } printf "%d sec elapsed\n", $end - $beginning;
That's just a very crude demonstration, but it gives you an idea what needs to be done.

update: here's a more perlish way to initialize month numbers:

my $i=0; my %month = map {$_=>$i++} qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct +Nov Dec/;