in reply to Re^5: date and time difference
in thread date and time difference

Hi, Haukex

Thanks a lot for your very kindly answer

I tried to execute the script but got the following error message.

It looked there were not the module in my perl version.

I am sorry to say whether there is another way to solve in my perl version?

Thanks in advance,

sd_loader# perl ./test1.pl

"timegm_modern" is not exported by the Time::Local module

Can't continue after import errors at ./test1.pl line 8

BEGIN failed--compilation aborted at ./test1.pl line 8.

sd_loader# perl ./test1.pl

Can't locate Time/Piece.pm in @INC (@INC contains: /usr/libdata/perl5/i386-openbsd/5.8.8 /usr/local/libdata/perl5/i386-openbsd/5.8.8 /usr/libdata/perl5 /usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/local/lib/perl5/site_perl .) at ./test1.pl line 9.

BEGIN failed--compilation aborted at ./test1.pl line 9.

sd_loader# perl ./test1.pl

Can't locate DateTime.pm in @INC (@INC contains: /usr/libdata/perl5/i386-openbsd/5.8.8 /usr/local/libdata/perl5/i386-

openbsd/5.8.8 /usr/libdata/perl5 /usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-

openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/local/lib/perl5/site_perl .) at ./test1.pl line 9.

BEGIN failed--compilation aborted at ./test1.pl line 9.

Replies are listed 'Best First'.
Re^7: date and time difference
by haukex (Archbishop) on Jan 09, 2020 at 21:56 UTC
    "timegm_modern" is not exported by the Time::Local module

    That function wasn't added to Time::Local until version 1.27; Perl 5.8.7 shipped with version 1.11. In all three cases, the best option is to update/install the modules.

Re^7: date and time difference
by Anonymous Monk on Jan 09, 2020 at 08:31 UTC

    It looked there were not the module in my perl version.

    Hi,

    The solution is to install the module, its much simpler than reinventing the module.

    cpan Time::Piece