use IO::Socket::INET;
use warnings;
use strict;
my $host = "www.google.com";
my $sock = IO::Socket::INET->new(PeerAddr => "$host",
PeerPort => 80)
or die "Didn't work!";
print $sock "GET / HTTP/1.1";
my @html=<$sock>;
foreach (@html) {
print "$_";
}
| Posted by dhaivat on Wed 3 Mar 2010 13:52 | 212 views
- Syntax: None
- Expires: never
- Report
- IMG
- Download
-
|
