0719login:Penguin
2019/05/11(土) 13:21:35.38ID:N1J1rW33use warnings;
use IO::Socket::INET;
my $s = IO::Socket::INET->new(Listen => 5, LocalPort => $ARGV[0], Proto => 'tcp', ReuseAddr => 1) or die $!;
$s->listen;
while(my $c = $s->accept) {
while(my $q = $c->getline) {
print $q;
$c->print($q);
}
$c->close;
}
$s->close;