use IO::Socket; my $sock = IO::Socket::INET->new(PeerAddr => 'www.xxxxx.com', PeerPort => '81', Proto => 'tcp' ); while (<$sock>){ print; }