Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use IO::Socket;
- $host=shift @ARGV;
- $port=shift @ARGV;
- $socket=IO::Socket::INET->new(PeerAddr=> $host, PeerPort=> $port, Proto=> 'tcp',
- Type=> SOCK_STREAM) or die "Can't talk to $host at $port";
- while (<>) {
- print $socket $_;
- }
- close $socket;
Add Comment
Please, Sign In to add comment