I've got a perl script: run.pl that's been called by cron every minute.
The only thing run.pl does is call two other scripts: download.pl and parse.pl:
#!/usr/bin/perl
use warnings;
use strict;
do 'download.pl';
do 'parse.pl';
print "done!\n";
In download.pl and parse.pl are two prints to with "done downloading" and "done parsing" Now I output the script to /var/log/script.log and check for the script to run.
The run.pl script is doing fine, it outputs "done!" to the logfile. But the other two scripts aren't called. I think it is a relative path problem, it works when I use the absolute path.
But that's the problem, the script is in teststage and changes paths every time, it would be a mess to always change te absolute path.
Is there a way to let the scripts run from the relative path?
Edit: When I run it myself from the commandline with "perl run.pl" it runs the scripts without a problem.