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
installation:
 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

tq.
spreqAsked:
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
like:

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

If you want to run perl command in the commandline, you can use full path,
/usr/local/bin/perl

or
make an alias for perl to use /usr/local/bin/perl
or
set PATH to make sure search /usr/local/bin before /bin and /usr/bin,
eg
PATH=/usr/local/bin:$PATH
export PATH
0
 
gripeCommented:
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)
0
 
PsiCopCommented:
Do NOT damage/destroy the old Perl!!!!!!!!!!!!
0
 
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.
0
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.