in reply to How to Use a Cron Job

Make sure your script always uses absolute paths when working with files. Don't assume it'll always start in the same directory you developed it in. As an example,
open my $fh, "<file.dat" or die "Error: $!\n";
The above open() will most likely fail because the statement was written with an assumption that "file.dat" is in the current working directory.
The same applies to your own libraries. If you had a .pm file in the same directory as your script, "use MyMod;" will no longer work when the script is executed from CRON. To fix, include "use lib '/path/to/libs/';"

--perlplexer