The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Perl Programming
|
Unfortunately using perl 4.0...
Discuss Unfortunately using perl 4.0... in the Perl Programming forum on Dev Shed. Unfortunately using perl 4.0... Perl Programming forum discussing coding in Perl, utilizing Perl modules, and other Perl-related topics. Perl, the Practical Extraction and Reporting Language, is the choice for many for parsing textual information.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 20th, 2000, 09:00 AM
|
|
Junior Member
|
|
Join Date: Jun 2000
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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";
}
|

June 20th, 2000, 02:38 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
>>under HP-UX I just get error messages
What was the exact error?
|

June 21st, 2000, 03:52 AM
|
|
Junior Member
|
|
Join Date: Jun 2000
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|

June 21st, 2000, 05:02 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
>>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();
|

June 21st, 2000, 05:13 AM
|
|
Junior Member
|
|
Join Date: Jun 2000
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|

June 21st, 2000, 05:44 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
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!
|

June 21st, 2000, 05:48 AM
|
|
Junior Member
|
|
Join Date: Jun 2000
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Thanks, I kinda figured it was perl4 not me
having problems.
|

June 21st, 2000, 10:56 AM
|
|
Contributing User
|
|
Join Date: Jul 1999
Posts: 33
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
yep, perl4 doesn't use modules. you know perl 5 is for you.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|