Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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...);).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://659944]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-12-06 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (102 votes). Check out past polls.