programming-examples/perl/Network/Simple TCP Clients.pl

11 lines
252 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use warnings;
use strict;
use IO::Socket;
my $sock = IO::Socket::INET->new('remote.host.com:7777');
while (<$sock>) {
print "Server: $sock\n";
print "Response?";
my $response = <STDIN>;
print $sock $response;
}