#!/usr/bin/perl -w use strict; my $host = shift @ARGV or die "Specify host!\n"; my $port = shift @ARGV or die "Specify TCP port for host $host!\n"; use IO::Socket::INET (); my $file = IO::Socket::INET -> new ( PeerAddr => $host, PeerPort => $port, Proto => 'TCP' ) or die "Unable to cat $host:$port!\n"; while(<$file>){ print; } $file->close(); exit 0;