Rob Dixon wrote:
S, Rajini (STSD) wrote:
From: Gunnar Hjalmarsson [mailto:nore...@gunnar.cc]
Your particular problem can be easily solved using only a module that is included in the standard Perl distribution.

    use Date::Parse;

    my $time1 = str2time '26-Jan-2009';
    my $time2 = str2time '14-Jan-2009';

    print 'Difference: ',
      sprintf( '%.0f', ($time1-$time2)/86400 ), " days\n";

Thanks Gunnar for the suggestions. In which version of perl is Parse module available. We have perl version 5.8.0 and parse module is not available.

(Please bottom-post your responses to this group. Thank you.)

As far as I know Gunnar is mistaken and Date::Parse is not a standard module in
any version of Perl.

Obviously I am; Sorry about that. (It happened to be included in both the distributions I am currently working with.)

Still easy to install, of course. ;-)

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to