vancetech has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use IO::Socket::INET; my $sock = IO::Socket::INET->new( Proto => 'tcp', MultiHomed => 1, Blocking => 1, Type => SOCK_STREAM, ); $sock->connect( 80, inet_aton('alistapart.com') ); if( defined $sock && $sock->connected ) { $sock->send(qq{GET / HTTP/1.0\r\n\r\n}); $sock->recv($buffer, 1024); print $buffer . "\n"; } else { print "$!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using MultiHomed not working in IO::Socket::INET?
by ikegami (Patriarch) on May 24, 2006 at 21:07 UTC | |
by vancetech (Beadle) on May 24, 2006 at 22:09 UTC |