|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
hi, I seem to have ended up in a position
where I will be using HP-UX and perl 4.0.1.8 (7 years old!). I had already written some code under W32 perl 5 but which doesnt work here. The problem seems to be with use modules, under HP-UX I just get error messages, here is a brief of what doesnt work under HP but does under W32, can anyone help: -------------------------------------------- #!/usr/bin/perl #this file is test.pl use headers qw(content_type); headers::content_type; -------------------------------------------- #!/usr/bin/perl #this file is headers.pm @EXPORT = qw(content_type); sub content_type { print "Content-type: text/htmlnn"; } |
|
#2
|
|||
|
|||
|
>>under HP-UX I just get error messages
What was the exact error? |
|
#3
|
|||
|
|||
|
syntax error in file test3.pl at line 3, next 2 tokens "use test1"
Execution of test3.pl aborted due to compilation errors note that these file names are not quite the same as those in my previous post but the code is still correct. |
|
#4
|
|||
|
|||
|
>>use headers qw(content_type);
This line looks fine to me >>headers::content_type; This should be the error line Anyway, try this and see.. #!/usr/bin/perl use headers qw(content_type); content_type(); |
|
#5
|
|||
|
|||
|
it seems that no matter what is put, perl
just isnt having 'use ***'. It always throws an error on these tokens. What comes after is probably fine but it never gets there. |
|
#6
|
|||
|
|||
|
I just tested it with perl4, it really failed. It also failed using "require". Well, your server really needs to update to the latest perl 5.6.0. I dunno about HP-UX, but it compiled quite easy on my FreeBSD 4.0. If it's not your box, tell your sysadmin to do so immediately or he doesn't deserve to be a sysadmin at all.
Good Luck! |
|
#7
|
|||
|
|||
|
Thanks, I kinda figured it was perl4 not me
having problems. |
|
#8
|
|||
|
|||
|
yep, perl4 doesn't use modules. you know perl 5 is for you.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Unfortunately using perl 4.0... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|