1755711 Members
4751 Online
108837 Solutions
New Discussion юеВ

Re: More of Perl script

 
SOLVED
Go to solution
Francesco_13
Regular Advisor

More of Perl script

Hi,
i have changed in my Oracle script (Hp-ux 11i)to point to perl.
But now i have other error that i don't know:

bkp_restore.pl
Can't locate Getopt/Std.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RI.
BEGIN failed--compilation aborted at ./bkp_restore.pl line 8.


Script :

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

# Copyright ┬й 2003, Oracle. All rights reserved.
# Last Revised: 03/10/28
# Version: 9.0.4.0.0

# Include Libraries
use Getopt::Std; line 8 <-----
use File::Basename;
use File::Copy;
use File::Path;

use strict; # Disable automatic variables


Best regards.
Francesco
5 REPLIES 5
Peter Godron
Honored Contributor

Re: More of Perl script

Francesco,
has this script ever worked on this machine?
It seems you do not have all the modules installed for the code to run, or they are not included in your path.
Regards
Francesco_13
Regular Advisor

Re: More of Perl script

Hi,
not this it's a first time, never worked.
I do it to install other perl package?

swlist|grep perl
perl B.5.6.1.C Perl Programming Languag

Regards.
Francesco
H.Merijn Brand (procura
Honored Contributor
Solution

Re: More of Perl script

1. Your profile shows "I have assigned points to 51 of 121 responses to my questions.". Please improve
2. You closed a thread with a bunny, but did not assign points. That's very uninformative
3. You have more perls installed, and you are using the wrong version
4. The perls you have installed are all old, and could use an upgrade

/usr/contrib/bin/perl is version 4. It's very stable. To use Jarkko Hietaniemi's definition of stable: "dead", as in unusable.
Your script uses the "use strict" syntax, which is very good, but perl4 does not even know that syntax

perl-5.6.0 is considered the worst stable release ever by the perl5 porters. I advise to upgrade to a more recent version. If you need a 5.6, please try to find 5.6.2, otherwise go for 5.8.5 or newer, certainly if you are heading down the Oracle track. Oracle 10 and up *require* a 64bit perl, and 5.6 is far from reliable in the 64bit world. 5.8.5 and up is.

So the first thing to do is to alter your $PATH to have /usr/contrib/bin AT THE END (if you choose to include it at all). Preferably in /etc/PATH, so you cannot make that mistake again.

Second thing to do is to get yourself a more recent version of Perl. Either from HP Porting center, or from me. Both include a recent DBI, which you will need for DBD modules.

Perl from the porting center:
http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.8.5/

Perl from my HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Peter Godron
Honored Contributor

Re: More of Perl script

Hi,
having looked back at your earlier thread at:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851733
I realise I should have spotted that you were running a dead version of perl.
Totally agree with procure, upgrade to a 'good' version of perl, change your path to include your new install and then try again.
Good Luck.
Francesco_13
Regular Advisor

Re: More of Perl script

Thanks, and i'm sorry if no point was assigned in the past, was be no intetionally.

Best regards.
Francesco