Hi,

I'm assuming this post is OT.
I expect that the problem is explained in terms of the Linux operating system.
I run:
$ which perl /home/sisyphus-sis/blead-5.33.1-m64-ld/bin/perl
and I therefore assume that perl and /home/sisyphus-sis/blead-5.33.1-m64-ld/bin/perl will be one and the same ... but they're not.
$ /home/sisyphus-sis/blead-5.33.1-m64-ld/bin/perl -le 'print $];' 5.033001 $ perl -le 'print $];' 5.014002
How is this explained ?
It seems to happen when, having specified a $PATH that contains perl-5.014002 as the first perl in $PATH, I then position a different perl (5.33.1) ahead of perl-5.014002 in $PATH (without actually altering $PATH).
So, I'm thinking it's some sort of caching bug in my Debian wheezy system. (I haven't yet checked to see whether Ubuntu-18.04 does the same thing.)

Is it buggy behaviour ? ... or is there some clever legalese that justifies it ?

Cheers,
Rob

PS
To elaborate, I built 5.33.1 into the above-specified location, and prepended that above-specified location (ie /home/sisyphus-sis/blead-5.33.1-m64-ld/bin) to $PATH, but both perl -V and which perl reported the system perl (5.014002), which is further along in $PATH.

This happened because I forgot to build perl-5.33.1 with the -Uversiononly configure option, and the perl executable was in fact named perl5.33.1
So I created a copy of perl5.33.1 named perl and, while which perl now specifies this copy of perl5.33.1, if I invoke perl it's still the system perl that is executed.
Seems insane to me.

In reply to [OT] 'perl' is not the 'perl' reported by 'which perl' by syphilis

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.