Operating System - HP-UX
1836122 Members
3218 Online
110089 Solutions
New Discussion

Perl, out with the old, in with the new?

 
SOLVED
Go to solution
John Love_3
Regular Advisor

Perl, out with the old, in with the new?

I have a D class server with HP-UX 11.0 and when I do a perl -v I get:
#perl -v

This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
Patch level: 36

Copyright (c) 1989, 1990, 1991, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 4.0 source kit.

Now, I have a DEPOT file with Perl 5.6.0 and when I install it I still get Perl 4.0 with the perl -v command.

How do I get rid of the 4.0 and have the 5.6.0 version work? The install goes fine, no errors.

Help please. I need a web server that uses this newer version of perl (Apache is already installed on this server).

Thanks!

John
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: Perl, out with the old, in with the new?

The perl version 4 is installed in /usr/contrib/bin I think. The perl version 5.6 that you just installed is installed in /opt/perl5/bin.

There are 2 things that you can do:

1a) rename (mv) /usr/contrib/bin/perl to /usr/contrib/bin/perl.old

1b) link /usr/contrib/bin/perl to /opt/perl5/bin/perl (ln -s /opt/perl5/bin/perl /usr/contrib/bin/perl -- I think I got the order right on the link, I'm not at work so I can't double check).

2) Modify your path so that /opt/perl5/bin appears before /usr/contrib/bin

Either should work for you.

Good luck.
John Love_3
Regular Advisor

Re: Perl, out with the old, in with the new?

Patrick

I went with option 1 since I wasn't sure how to change the order of my path.

It works perfectly and the syntax was exactly right.

Thanks a lot!

John
Bill Hassell
Honored Contributor

Re: Perl, out with the old, in with the new?

Perl 4 is supplied just for the q4 program and a few references in SAM. To adjust the $PATH value, edit /etc/PATH. /etc/profile sets $PATH using this file. Well written shell (and perl) scripts will have the path in the first line:

#!/opt/perl5/bin/perl


Bill Hassell, sysadmin