IO::Socket client mode

[email protected] Wed, 5 Sep 2001 11:01:37 -0500
Newsgroups perl.macperl.modules,perl.macperl.toolbox
Message-ID <a05100304b7bbf98fad9a@[66.32.38.12]>
Hi, I'm unable to use IO::Socket in MacPerl to successfully run a
TCP/IP socket "client."  I am able to use it successfully in "server"
mode (where I do a "listen"), but every time I attempt to use it
in "client" mode (where I call the remote host), I cannot establish
a connection.  The following line always takes the "die":

      $socket = IO::Socket::INET->new(Proto=>"tcp", 
PeerAddr=>'64.58.76.226', PeerPort=>"80", Reuse=>1)
  or die "Can't connect to 64.58.76.226\n";

It doesn't matter what IP address I use (the one I used here is Yahoo).
Can anyone tell me what I'm doing wrong?
Please copy my email address on any replies.
Thanks,
Rick