At 15:36 -0400 2002.05.31, mpmcl wrote: >I am using the following code, adapted from Power & Ease, pg. 241: > >*** SocketTest.pl *** > >#!perl -w > >use IO::Socket; > >$sock = IO::Socket::INET->new(PeerAddr => 'whois.crsnic.net', > PeerPort => '43', > Proto => 'tcp', > Timeout => 30) or die ($@); > >close($sock); > >print "Got to here!\n"; > >*** End Code *** > >This dies, with a timeout, every time regardless of the Internet >address. [The address/port shown should connect very easily since it is >a well-known target.]
That code works for me, with the same hostname and port. >1) I am trying to connect from behind a corporate firewall and am using DHCP. > >2) Other programs that make Internet connections are no problem, e.g., >DNSTran 1.5.1, which I use a lot (via AppleScript). > >Am I missing something obvious? or is there some subtle problem here >or, perhaps, a configuration glitch? > >What I am really asking is, "Does the program above work for everyone >but me :-(" Maybe your firewall doesn't allow outgoing connections destined for port 43? I don't know. -- Chris Nandor [EMAIL PROTECTED] http://pudge.net/ Open Source Development Network [EMAIL PROTECTED] http://osdn.com/