Hi, I have a question about how perl builds the @INC array at startup. I've checked perlrun but this hasn't really answered my questions.

I have PERL5LIB set to a list of directories, but I've noticed that perl can "detect" certain "special" subdirectories if they exist. In my case (running 5.8.0 on HP-UX) it will add subdirectories "5.8.0" and "PA-RISC1.1" into @INC if it finds them.

Is there a full list of all these "special" directories? Is there an equivalent to the version-specific directory, for other (older) versions of perl? My problem is that I'm trying to construct an environment where perl 5.8.0 can co-exist with perl 5.004_04, but I can't get the older perl to recognise any version-specific subdirectory (I've tried 5.004_04, 5.00404, 5.4.4 etc).

Update: if at all possible I need to get perl to see the version-specific directories without changing the source by adding "use lib" or -I.

If these special directories are set at compile time, is there any way of looking up what they were set to? perl -V didn't show this (unless I missed something).

Thanks.

s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;

In reply to Construction of @INC by different versions of perl by muntfish

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.