> -----Original Message-----
> From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 22, 2002 11:42 AM
> To: [EMAIL PROTECTED]
> Subject: Re:IO::Socket::Inet
> 
> 
> Hi, i have this
> use IO::Socket;
> $port=21;
> 
> $server="155.132.48.23";
> #$server="192.40.54.41";
> 
> $sock = IO::Socket::INET->new(PeerAddr  =>$server,
>                                         PeerPort => $port,
>                                         Proto => 'tcp') ;
>                                         
>  it works but what i wanted is to make it not from a remote 
> host but a local 
> host to avoid needing ip adress.
>  i tried this:
>  $sock = IO::Socket::INET->new(LocalHost  =>'localhost',
>                                         PeerPort => $port,
>                                         Proto => 'tcp') ; 
>   but it fails I don't know how to specify 'localhost'
>   Thanks.                                      

If I understand correctly, the server process is running on
the local host. In that case, use:

   PeerAddr => 'localhost' 

instead of LocalHost => 'localhost'

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to