Downloading a Web page in Perl using IO::Socket::INET

use strict;
use warnings;

use IO::Socket::INET;

main();

sub main {
    my $socket = IO::Socket::INET->new(PeerAddr => 'www.martinbroadhurst.com',
            PeerPort => 'http(80)',
            Proto    => 'tcp');
    print $socket "GET / HTTP/1.0\nHost: www.martinbroadhurst.com\n\n";
    print <$socket>;
    print "\n";
}