All pastes #767419 Raw Edit

uadmin_server-0.1.1

public text v1 · immutable
·published 2007-11-09 19:13 UTC
rendered paste body
use strict;
use IO::Socket;

my $listen = new IO::Socket::INET (
  LocalHost => $ENV{COMPUTERNAME},
  LocalPort => q(7070),
  Proto     => q(tcp),
  Listen    => 1,
  Reuse     => 1,
);

my @input;
while (1) {
  my $sock = $listen->accept();
  while (<$sock>) {
    unshift(@input,$_);
  }
  close($sock);
  if ($input[0] eq q(END_TRANSFER)) {
    shift @input;
    @input = reverse @input;
    last;
  }
}

print qq($_\n) foreach @input;