1829448 Members
1164 Online
109992 Solutions
New Discussion

HP-UX and Perl

 
SOLVED
Go to solution
rccmum
Super Advisor

HP-UX and Perl

Hi,

Maybe the question will sound dumb but I thought of asking and learn something.

As I know perl is not a part HPUX Core OS but an add-on IE s/w ( Not sure about 11.31 though).

Is it possible to create a runtime perl environment, create a package and have some perl scripts along with it to run on HPUX?


5 REPLIES 5
Tim Nelson
Honored Contributor

Re: HP-UX and Perl

A couple options.

Perl is typically package with the OS.

Perl is available as a HPUX depot, find it on software.hp.com

Need something special, or your own tweeks ? Compile your own from binaries, will need a compiler to do it. Merjins website has great resources too. develoopers.com ( i think ).

do a search on this forum, you will see lots and lots of threads.


James R. Ferguson
Acclaimed Contributor

Re: HP-UX and Perl

Hi:

Perl runs on virtually any operating system you might want.

For HP-UX you can get a nice distribution, pre-compiled for 11.31 here:

http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL

I would suggest using 5.8.8 as it is a very stable port.

Once installed, you can add modules if you like from CPAN:

http://www.cpan.org/

Perl offers a complete runtime environment as installed. There's nothing to do after the above installation but begin to use it!

Normally, a symbolic link '/usr/bin/perl' is created to point to the real Perl location ('/opt/perl' for HP-UX). Use this symbolic link as the interpreter line in your scripts for the best portabilty (within UNIX).

Regards!

...JRF...
rccmum
Super Advisor

Re: HP-UX and Perl

So it means there is not such run-time perl components thing huh? You have to have perl installed on a system.

How it would work if you are using a perl module in your perl script and that particular module is not installed on a system ? Can you make that module as a part of the script in some way so the script can run on the system?
Suraj K Sankari
Honored Contributor

Re: HP-UX and Perl

By default perl is inbuilt with hp-ux, perl is installed or not do this
$ whereis perl
perl: /usr/bin/perl /opt/dsau/bin/perl /opt/dsau/sbin/perl /opt/perl_32/bin/perl /opt/perl/bin/perl /opt/perl_64/bin/perl /opt/perl_32/man/man1/perl.1 /opt/perl/man/man1/perl.1 /opt/perl_64/man/man1/perl.1

or

$ /usr/sbin/swlist -l product | grep -i perl
Perl5-32 D.5.8.8.B 32-bit 5.8.8 Perl Programming Language with Extensions
Perl5-64 D.5.8.8.B 64-bit 5.8.8 Perl Programming Language with Extensions

Suraj
H.Merijn Brand (procura
Honored Contributor
Solution

Re: HP-UX and Perl

There is: PAR

http://search.cpan.org/dist/PAR

If you keep to just using CORE modules, you don't need it, as it is very well defined which CORE modules are available in what perl version.

A (big) disadvantage of packaging your application like this, is that it tends to grow (very) big.

An advantage is that you are sure that all you need is there, but it brings another disadvantage: You don't know for sure if all that you package worrks on the target machine, even if the architecture matches. Note that the scripts inside the package will use the modules within the package, and won't search outside of it for possible newer or native modules. If one of the modules depends on shared libraries, it can get worse. OpenSSL 0.9.7 is not compatable with 0.9.8 and I don't want to count the systems that do not have libiconv (good choice to not install those if you ask me, I hate NLS).

So, your milage may vary

Enjoy, Have FUN! H.Merijn [ not Merjin ]
Enjoy, Have FUN! H.Merijn