my $buf; while ( read(STDIN, $buf, 128) ) { print SOCKET, $buf; }