Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl, DBI and CRON

Status
Not open for further replies.

plotzer

Programmer
Aug 28, 2001
35
US
I know there is an easy solution to this but I am not sure how to designate the path to my DBI module library within a perl file so the perl script can be run under cron. When the script dows run in cron I get an error that the oracle dbi library cannot be located. I assume this is because the root user running cron does not know where it is. Can the path be set within the perl script itself?

Thanks
 
There's a hash called %ENV that contains environment variables, path being one of them. A better way to point to modules in perl5 is
Code:
use lib '/path/to/module';
This is just a nice way to add a directory to perl's library search path @INC. I don't know if your issue is about finding a driver and not a module and if it makes any difference. I suppose the path environment should clear things up if use lib doesn't.

----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top