[X-Unix] The which command lies?

Eric F Crist ecrist at secure-computing.net
Tue Feb 16 08:08:32 PST 2010


On Feb 16, 2010, at 10:05:30, Craig A. Finseth wrote:

>   Am 16.02.2010 um 04:01 schrieb Steve Morris:
> 
>> `which perl` -e 'print "@INC\n";'
>> perl -e 'print "@INC\n";'
> 
>   Is perl now an alias? Try:
> 
>     alias perl
> 
>> Instead these commands gave me totally different results indicating two different installations of perl. It turns out that my redirections were working but "which" wasn't seeing them.
> 	...
> 
> Not addressing the exact problem, but the one most likely to arise
> next: if you are executing Perl scripts, the path of the Perl
> interpreter is normally given in the first line.  This will override
> the version of Perl that is in your path.

Only the script is being executed directly, and not being called as an argument to the perl binary.
---
Eric Crist






More information about the X-Unix mailing list