use IO::Socket::INET; use strict; use warnings; my $connection = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "jagadish.blogspot.com", PeerPort =>80) || die "failed"; print $connection "HEAD http://jagadish.blogspot.com/index.html HTTP/1.1\r\nHost: jagadish.blogspot.com\r\n\r\n"; while (<$connection>) { ($_ eq "\r\n") ? last : print; }