Re: libwww-perl: hostname.pl problem

Frank San Filippo (frank@w3-design.com)
Mon, 11 Sep 1995 15:17:06 -0700


 Caleb.Kwok@CENTAO wrote:

>
>Hi,
>
>I installed libwww-perl-0.40 on our Sun machine under SunOS 5.4. The perl
>being used is perl 4.036 for testing out the libwww-perl. (However, the
>perl 5.01 is in production in our machine)
>
>After configuration, I tried out the get command. the get command
>seems to be working ok. However, I receive the following
>message:
> Can't exec "hostname": No such file or directory at /users/agric/webtools/
> libwww-perl/libwww-perl-0.40/hostname.pl line 24.


You need to change this line to :
chop($host = `/usr/ucb/hostname`);            # The preferred BSD method

You'll prolly also want to compile and run sys_socket_ph.c unless you've
fixed lines 100-105 of sys/socket.ph

Now I have a question: On my machine, hostname does not return the FQDN; it
just returns 'w3-design' instead of 'w3-design.com', Is this a problem? Is
this due to having w3-design instead of 'w3-design.com' in /etc/hosts?

--
F r a n k S a n F i l i p p o w 3 - d e s i g n

(310) 815-1177 fax:(310) 815-1133