Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 20th, 2000, 09:00 AM
Tychom Tychom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 Tychom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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";
}

Reply With Quote
  #2  
Old June 20th, 2000, 02:38 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>under HP-UX I just get error messages

What was the exact error?

Reply With Quote
  #3  
Old June 21st, 2000, 03:52 AM
Tychom Tychom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 Tychom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #4  
Old June 21st, 2000, 05:02 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
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();

Reply With Quote
  #5  
Old June 21st, 2000, 05:13 AM
Tychom Tychom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 Tychom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #6  
Old June 21st, 2000, 05:44 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
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!

Reply With Quote
  #7  
Old June 21st, 2000, 05:48 AM
Tychom Tychom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 Tychom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks, I kinda figured it was perl4 not me
having problems.

Reply With Quote
  #8  
Old June 21st, 2000, 10:56 AM
Imo Imo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 1999
Posts: 33 Imo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
yep, perl4 doesn't use modules. you know perl 5 is for you.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Unfortunately using perl 4.0...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway