Operating System - HP-UX
1827303 Members
3264 Online
109961 Solutions
New Discussion

Perl syntax errors when run on HP-UX

 
SOLVED
Go to solution
Tony Walker
Frequent Advisor

Perl syntax errors when run on HP-UX

Dear Forumers,

I'm currently have a play around with Perl and as usual jumping in at the deep end I'm starting with sockets programming. I have a simple little script which works find on my Mandrake 8.2 install but gives me the following error when run on HP.

Any help would be much appreciated.

Thanks

Tony

"use" may clash with future reserved word at /tmp/talk.pl line 3.
syntax error in file /tmp/talk.pl at line 3, next 2 tokens "use IO"
"use" may clash with future reserved word at /tmp/talk.pl line 4.
syntax error in file /tmp/talk.pl at line 26, next 2 tokens "->"
syntax error in file /tmp/talk.pl at line 28, next 2 tokens "->"
syntax error in file /tmp/talk.pl at line 34, next 2 tokens "}"
syntax error in file /tmp/talk.pl at line 46, next token "}"
Execution of /tmp/talk.pl aborted due to compilation errors.
3 REPLIES 3
Steve Steel
Honored Contributor
Solution

Re: Perl syntax errors when run on HP-UX

Hi

This is a known problem.
Check the version of perl on the system.

#what `which perl`

You should have perl5 installed .There may already be perl5 on your system. Check /opt/perl*/bin directory, if it exists and check the version there. If it is not there, download the perl5 version and also remember to set the /usr/sbin/perl link to point to the new binary.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
harry d brown jr
Honored Contributor

Re: Perl syntax errors when run on HP-UX

Like Steve said, get a newer version of perl:

http://hpux.cs.utah.edu/hppd/hpux/Languages/perl-5.6.1/

Your mandrake perl is at least 5.0, if not 5.6.

live free or die
harry
Live Free or Die
Tony Walker
Frequent Advisor

Re: Perl syntax errors when run on HP-UX

Thanks guys, I now have perl5 and my script runs fine.

Thanks

Tony