#!/usr/bin/perl

use warnings;
use strict;

use IO::Socket;

die "Uso: $0 <host> <puerto> <archivo a grabar>\n"
	unless(@ARGV == 3);
my($host, $port, $file) = @ARGV;

my($remote) = IO::Socket::INET->new(
    Proto => "tcp",
    PeerAddr => $host,
    PeerPort => $port
    )
    or die "error conectando a $host/$port :$!";

print $remote "$file\n";
while ( <STDIN> ) { print $remote $_ }

