After a long time in the Unix world I'm trying to write a script that accesses a MySql database from Windows. Right off the bat, I've run into trouble: perl can't find DBI.pm.
I've got perl installed into C:\Perl and a search reveals that DBI.pm is installed in C:\Perl\site\lib\PerlEx\DBI.pm. When I run my script (from cygwin), I get this:
$ perl populate_db.pl
Can't locate DBI.pm in @INC (@INC contains: c:/Perl/lib c:/Perl/site/l
+ib .) at populate_db.pl line 3
.
BEGIN failed--compilation aborted at populate_db.pl line 3.
The source code couldn't be simpler:
#!/usr/bin/perl -w
use DBI;
I feel sure that I'm missing some basic concept about perl under Windows, but my searches have proved fruitless. Can anyone point me in a direction?
-Logan
"What do I want? I'm an American. I want more."
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|