Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Script runs from command line but not via crontab

by ForgotPasswordAgain (Deacon)
on Jan 02, 2008 at 10:25 UTC ( #659944=note: print w/ replies, xml ) Need Help??


in reply to Script runs from command line but not via crontab

Oh la la.... You have no error checking at all. Start with putting some 'or die "blah: $!"' after the calls to open. When it's working, add use strict; use warnings; to the top of the code and declare variables with my as necessary. Get rid of the global variables like @fields within the subroutines. Replace open FILE1 by open my $file1. Replace the blobs of ifs with hashes (%langname = (English => 'en', Indonesian => 'id', etc...);).


Comment on Re: Script runs from command line but not via crontab
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (16)
As of 2014-07-11 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (235 votes), past polls