Operating System - HP-UX
1752577 Members
4557 Online
108788 Solutions
New Discussion юеВ

PERL script syntax errors

 
dragana s-v
Advisor

PERL script syntax errors

Hi,
I have a PERL script running fine on HP-UX 10.20 and perl 5.004_04. The same script has number of sytax errors if it runs on 11.00 and latest PERL version 5.6.1.

The error are like:
syntax error in file ./nicchk.pl at line30, next 2 tokens "use IO"
syntax error in file ./nicchk.pl at line32, next 2 tokens "use IO"
syntax error in file ./nicchk.pl at line33, next 2 tokens "use IO"
syntax error in file ./nicchk.pl at line34, next 2 tokens "use IO"
Illegal modulus of constant zero in file ./nicchk.pl at line 35, next 2 tokens "nicvalue ="
Illegal expression (MODULO) as lvalue in file ./nicchk.pl at line 35, next 2 tokens ");"
syntax error in file ./nicchk.pl at line37, next 2 tokens "->"
syntax error in file ./nicchk.pl at line45, next 2 tokens "->"
syntax error in file ./nicchk.pl at line52, next 2 tokens "->"
syntax error in file ./nicchk.pl at line55, next 2 tokens "->"
./nicchk.pl has too many errors.

Any thoughts about the cause of this?

Thanks,
Dragana S-V
3 REPLIES 3
Rodney Hills
Honored Contributor

Re: PERL script syntax errors

Go to a CPAN site and download and install the IO module.

-- Rod Hills
There be dragons...
harry d brown jr
Honored Contributor

Re: PERL script syntax errors

Rodney has it right, in your 10.20 machine you had a perl module that you don't have on your 11.00 machine.

live free or die
harry
Live Free or Die
Sean OB_1
Honored Contributor

Re: PERL script syntax errors

Download and install the IO module. It's not installed on your 11.00 machine.

If you don't have/use CPAN, you might want to look into it as it can greatly help in installing perl modules.