If nothing changed in your script, then something changed in your environment. As almut has already pointed out, even a few weeks ago the push (@INC, "D:\\Perl\\site\\lib"); line had no effect since it was being executed after the use DBI statement. Previously, "D:\\Perl\\site\\lib" was already in @INC when your script began. Now it is no longer present.

In addition to the fix that almut has suggested (moving push (@INC, "D:\\Perl\\site\\lib"); into a BEGIN {...} block placed before use DBI you might want to look more closely at your environment to see what changed. Look particularly for changes in PATH, PERL5LIB, PERLLIB environment variables. Also if perl is running inside of a .bat file with command line switches, look for changes in the values passed to the -I argument. It is possible that other scripts you have written will have been affected by whatever changed. See perlrun for more information about what contributes to the value of @INC when your script runs.

Best, beth


In reply to Re: Cant locate DBI in @INC by ELISHEVA
in thread Cant locate DBI in @INC by Irishboy24

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.