Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: $tm = localtime;

by VinsWorldcom (Prior)
on Feb 15, 2017 at 16:52 UTC ( [id://1182073]=note: print w/replies, xml ) Need Help??


in reply to $tm = localtime;

Perl is Perl (for the most part) - they should work fine on Windows and Unix with no changes. That said, I'm not familiar with the modules Date::Pcalc or Date::EzDate, if they use XS with specific Windows API calls there may be issues on Unix.

Have you tried running the commands as-is on Unix? What errors (if any) did you get?

Replies are listed 'Best First'.
Re^2: $tm = localtime;
by bNathan (Novice) on Feb 20, 2017 at 21:09 UTC

    use Strict;

    BEGIN not safe after errors--compilation aborted at /home/urmaster/www/cgi-bin/regproducts_process.pl line 205.

    205 use Date::Pcalc qw(Add_Delta_DHMS);<?p>

      BEGIN not safe after errors--compilation aborted at /home/urmaster/www/cgi-bin/regproducts_process.pl line 205.

      Thanks for this message. Unfortunately that is only the last line of the error block and only tells us where the problem happened and not what it was. Why not tell us the previous couple of error messages so we can see what it doesn't like about Date::Pcalc? Maybe it isn't installed or in the wrong place or with the wrong version or has a missing dependency or ...

      I'm assuming use Strict is use strict in your program and that your are using Time::Piece in order for $tm = localtime to be an object that you can call $tm->mday, $tm->mon+1, etc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1182073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found