#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    4
    Rep 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";
    }
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>under HP-UX I just get error messages

    What was the exact error?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    4
    Rep 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.
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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();
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    4
    Rep 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.
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    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!
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    4
    Rep Power
    0
    Thanks, I kinda figured it was perl4 not me
    having problems.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 1999
    Posts
    33
    Rep Power
    16
    yep, perl4 doesn't use modules. you know perl 5 is for you.

IMN logo majestic logo threadwatch logo seochat tools logo