in reply to Re^2: Perl @INC Error (cron)
in thread Perl @INC Error

Since I can't see your line 142, you should start debugging, maybe using print in your script.

Replies are listed 'Best First'.
Re^4: Perl @INC Error (cron)
by zee3b (Novice) on Aug 15, 2013 at 15:54 UTC

    I fixed the problem. So when I was executing the script the /path/ it doesnt load the data files opened by the script because I didnt have the path included to the data files in the script since I assumed they were in the same directory. However, I think the shell script executes the files from a different directory, so I just added

    cd /pathofdirectory/ /pathofperl/perl /pathofscript/script.pl
    and it worked. Thanks a lot though!

Re^4: Perl @INC Error (cron)
by zee3b (Novice) on Aug 15, 2013 at 15:34 UTC

    Ok, I figured out the problem and it's really weird. When I go into the directory using "cd" and execute the script from there "perl script.pl" it works. I just tried it on windows too. But whenever I try "perl /path/script.pl" it gives me that data set error.

      The script probably expects the data file in the directory from which it was started. If you start it from a different one, it cannot find the data.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ