cocl04 has asked for the wisdom of the Perl Monks concerning the following question:
All, I resently installed cygwin on my windows pc. Prior to using cygwin, I used dos to run all of my bat files, perl, sql, etc... I can run all of my bat files for perl and sql in dos and / or cygwin. However, when I attempt to run the perl script directly at the command line in cygwin, I get the below error.
Can't locate DBI.pm in @INC
Initially, I tried the "use lib" module to point to the modules directory. It did not work.
It is very strange, because the perl script will run in cygwin as a bat file (i.e. ./test.bat) in the below format.
c:\test_error\test.pl > PERL_ERROR.log 2>&1
However, it will not run at the command line. I have tried some of the following options:
perl -w test.pl or ./test.pl
And I still get the error. Does anyone have any suggestion? How would perl run at all if the modules where not installed correctly? What is different about cygwin? Is there some kind of global view when running a bat file that cygwin does not see at the command line?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Running Perl with Cygwin
by ikegami (Patriarch) on Jun 23, 2009 at 20:37 UTC | |
by cocl04 (Sexton) on Jun 23, 2009 at 21:11 UTC | |
by roboticus (Chancellor) on Jun 25, 2009 at 15:56 UTC | |
by cocl04 (Sexton) on Jun 24, 2009 at 20:02 UTC | |
by ikegami (Patriarch) on Jun 24, 2009 at 20:16 UTC | |
by roboticus (Chancellor) on Jun 25, 2009 at 16:03 UTC | |
by perlpeter (Initiate) on Feb 21, 2014 at 05:19 UTC | |
by Anonymous Monk on Jul 10, 2009 at 05:24 UTC | |
|
Re: Running Perl with Cygwin
by CountZero (Bishop) on Jun 23, 2009 at 20:32 UTC |