#!/usr/bin/perl use strict; use warnings; use IO::Socket; my $http = IO::Socket::INET->new( PeerAddr => "mail.163.com", PeerPort => 80, Proto => 'tcp', Timeout => 20 ); print "Content-type: text/html\n\n"; print "Result: "; print $http;