Apologies if this is not the proper forum for this question. I am a Perl newbie attempting to port BW Whois to MacPerl. However, I have not been able to get *any* socket to work to date.
System: Macintosh G3 with Mac OS 9.1 MacPerl 5.6.1r1 via BBEdit 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.] FWIW 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 :-(" Thanks in advance for any help. -- Mike McLaughlin