Russell Johnson wrote:
> I have a perl script that I wrote that is supposed to query a service, then 
> write the results to a file in the temp directory. It exits, then another 
> script comes along and parses that file at intervals. For weird reasons, I 
> need to do it this way rather than have the parsing script query the service 
> itself. 
> 
> I have the following routine in my perl script:
> 
> sub writetemp {
>     open (NEWFILE, ">/tmp/$0.count") or die $!;
>     print NEWFILE "$product{name}.value $product{value} $date";
>     close (NEWFILE);
> }
> 
> This works like a champ when I run the script from the command line.
> 
> But when I run the script from roots cron, no output file is produced. I've 
> also tried producing the file in a subdirectory within the /root home 
> directory, with the same results. 

Running it at the command line as who and from who's crontab?

Where does the global variable $0 come from?  How is it set?

\\||/
Rod
-- 
> Anyone have any ideas?
> 
> Russell Johnson
> [email protected]
> 
> 
> 
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to