upgrade PERL

Hi all,
I just upgrade PERL from 5.005 to 5.82 on sparc solaris 8.
I download the PERL from www.sunfreeware.com and use this 2 command for
 i) gunzip -d perl....gz
 ii) pkgadd -d perl....

the installation succeed, but when i reboot and check the current perl using perl -V and perl -v,
it still using the perl 5.005 instead of the new perl.
 the old perl is at /usr/bin/perl
and the new one at /usr/local/bin/perl

my question is..
what/where should i change to change to new perl

Who is Participating?
yuzhConnect With a Mentor Commented:
>>what/where should i change to change to new perl

if you want to use the new old for script, make the filrst line of the script looks

#!/usr/local/bin/perl -w

If you want to run perl command in the commandline, you can use full path,

make an alias for perl to use /usr/local/bin/perl
set PATH to make sure search /usr/local/bin before /bin and /usr/bin,
export PATH
You can either set your PATH environment variable to check /usr/local/bin first like this:

export PATH=/usr/local/bin:$PATH

(You may want to add that to your profile)

Or you can create an alias that points to the new Perl:

alias perl='/usr/local/bin/perl'

(Also may go in your .profile (Or system wide /etc/profile)
Do NOT damage/destroy the old Perl!!!!!!!!!!!!
PsiCopConnect With a Mentor Commented:
There are automated system routines in Solaris 8 that depend on the old Perl. Fortunately, they are hardcoded to the the /usr/bin/perl5 path.

Compile and install the newer Perl normally, then unlink the /usr/bin/perl (which is just a link to executable in the original install) and link to your new one.

But do NOT otherwise tamper with or damage the existing Perl install.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.