The only thing that I see right off is that faxstat might not reside in a directory in the cron path. I have run into this before. You might try giving an absolute path and see if that works.
Matt -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Toddy Prawiraharjo Sent: Wednesday, August 30, 2006 5:30 PM To: perl-unix-users@listserv.ActiveState.com Subject: [Perl-unix-users] cron can't run perl properly? This should be easy for this milis, I got this script running fine in command-line/console in linux, but why I can't run it properly under cron? <code> open FAXSTAT, "faxstat -s |"; $limit = $ARGV[0]; $smallest = 9999; @tooBig = (); $found = "no"; while(<FAXSTAT>){ $jid = substr($_, 0,5); $content = "$jid\n"; if (($jid =~ /\d/) && ($jid <= $smallest)){ $smallest = $jid; #system("echo 'Smallest now is: $smallest'"); } } </code> If you see above code, if I execute perl manually, I can get the $smallest. But not if I run in cron Why? TIA. Toddy Prawiraharjo _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs