Hi all,

I've got a large file I'm considering upgrading from 5.005 to 5.6.1, and was curious about what kind of "errors" I might see. So, I changed my shebang link from "perl5" to "perl5_6_1" (which is how our directories on the Unix box are labeled - see below). I telnet'd to the Unix box to do a syntax check and I got the following error message:

/local/www/scripts/>perl -c nc_pf_56mainmenu.pl
Content-type: text/html
Software error:
Wed Sep 10 09:57:00 2003 CTlib.pm: Can't locate Sybase/CTlib.pm in @INC
(@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .)
at nc_pf_56mainmenu.pl line 12.
BEGIN failed--compilation aborted at nc_pf_56mainmenu.pl line 12.

I confirmed that the Sybase::CTLIB is in the following paths:

usr/local/lib/perl5/site_perl/Sybase/CTlib.pm
usr/local/lib/perl_5_6_1/site_perl/Sybase/CTlib.pm

I understand that the @INC is where the program will go look for stuff (and I think I already know how to push a directory onto @INC because I've had to look it up in here before), but my question is...
Why is it pointing to those old directories when I tell it the perl_5_6_1 directory in the shebang line?

My current (erroring) shebang line is: #!/usr/local/bin/perl5_6_1
The following works for the 5.0 version: #!/usr/local/bin/perl5

BTW, I also tried a "perl -d myfilename.pl" and plain old "perl myfilename.pl" just to see what would happen... I get the same error messages.

Thanks for any insights you can provide.

Lori


In reply to Error on converting 5.0 script to 5.6 script by Lori713

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.