Don't ask to ask, just ask | |
PerlMonks |
[OT] 'perl' is not the 'perl' reported by 'which perl'by syphilis (Archbishop) |
on Aug 21, 2020 at 14:06 UTC ( [id://11120959]=perlquestion: print w/replies, xml ) | Need Help?? |
syphilis has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'm assuming this post is OT. I expect that the problem is explained in terms of the Linux operating system. I run: 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. 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.
Back to
Seekers of Perl Wisdom
|
|