Sockets are bidirectional, so just print out the output back to the socket. Of course, system doesn't actually return the output, so you'll need something else.
my $client_sock = $sock->accept(); while(<$client_sock>){ chomp; print $client_sock `$_`; }
You'll need to add some kind of system to allow the client to know when the server is done sending.
Are you just exploring, or are you reinventing ssh?
In reply to Re: IO::Socket server->client
by ikegami
in thread IO::Socket server->client
by clone4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |