Friday, May 21, 2010

Change the Perl at the shell?

does anybody know how to change the Perl at the shell?





I have to do this:


"The path to PERL is /usr/pkg/bin/perl, not /usr/bin/perl (try which perl at the shell)"





I have /usr/pkg/bin/perl at the shell and I want to change it for /usr/bin/perl





I did try which perl at the shell and it only gives me " /usr/pkg/bin/perl"





Thank you.

Change the Perl at the shell?
get rid of /usr/bin/perl and make a symlink to the perl you really want to use!





ls -l /usr/bin/perl


lrwxr-xr-x 1 root wheel 9 Jul 9 2006 /usr/bin/perl -%26gt; perl5.8.6





I point to perl5.8.6 in the same dir...





Path is only half the battle to changing perl versions, the shebang line is the other half... this fixes both.
Reply:It sounds to me like your environment variable PATH has /usr/pkg/bin in it. Type echo $PATH to see what is all in it. Also type "man which" to learn exactly what which is showing.


If you really need perl at the path you're talking about why don't you make a symbolic link to /usr/pkg/bin/perl





At the shell type:





ln -s /usr/pkg/bin/perl /usr/bin/perl





The Data Analyst - http://www.squidoo.com/thedataanalyst


No comments:

Post a Comment