Operating System - HP-UX
1752788 Members
6387 Online
108789 Solutions
New Discussion

Re: perl script help needed

 
James R. Ferguson
Acclaimed Contributor

Re: perl script help needed

Hi (again):

 

Let me underscore what I said, before:


@James R. Ferguson wrote:

@zxcv wrote:

i have found smethng from net ..that usuually its not able to get the hostname....

/usr/opt/perl5/lib/5.8.8/aix-thread-multi/Socket.pm  .........

my hostname is testserver...is it greater than 8 char so itss d probm ????? or smthgnels


So, you're running on AIX not HP-UX.  Yes, I suspect that hostnames longer than the classic 8-character limit are a problem.  Why not test on a host whose name is =< 8 ?

 


You're clearly running the script on AIX, not HP-UX.  That said, I strongly suspect, given the relative age of the Perl version (5.8.8) that the C-library support for hostnames longer than the classic 8-character limit is supported.   You previously showed us:

 

BEGIN failed--compilation aborted at /tmp/test.pl line 60.
Use of uninitialized value in subroutine entry at /usr/opt/perl5/lib/5.8.8/aix-thread-multi/XSLoader.pm line 94.
Bad arg length for Socket::inet_ntoa, length is 0, should be 4 at /usr/opt/perl5/lib/5.8.8/aix-thread-multi/XSLoader.pm line 94.
Compilation failed in require at /tmp/test.pl line 60.
BEGIN failed--compilation aborted at /tmp/test.pl line 60.... 

 ...which points to the 'Socket' module not "playing nicely" with what the the dynamic library loader 'XSLoader' loaded.

 

My suggestions are two: (1) Verify that everything works with a hostname that is <= 8-characters (which I'm sure it will); and (2) consider upgrading to a current Perl version and/or contact IBM support to ascertain how/if they support hostnames in excess of 8-characters.

 

Regards!

 

...JRF...