upgrade PERL

Posted on 2005-05-15
Last Modified: 2013-12-27
Hi all,
I just upgrade PERL from 5.005 to 5.82 on sparc solaris 8.
I download the PERL from 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

Question by:spreq
    LVL 13

    Expert Comment

    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)
    LVL 38

    Accepted Solution

    >>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
    LVL 34

    Expert Comment

    Do NOT damage/destroy the old Perl!!!!!!!!!!!!
    LVL 34

    Assisted Solution

    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.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now