#!/usr/bin/perl -w use strict; use IO::Socket; use IO::Select; my $hname = "localhost"; my $hport = $ARGV[0]; my $sock = new IO::Socket::INET->new(  LocalPort => $hport,  Listen => 10,  Reuse => 1,  Proto => 'tcp' ); my $sel = new IO::Select->new(); $sel->add($sock); $sel->add(*STDIN); die "*Could not Connect" unless $sock; while(1){  while(my @ready = $sel->can_read) {    foreach my $fh (@ready) {      if ($fh eq $sock) {        my $new = $sock->accept;        $sel->add($new);        print "Willkommen\n";      }      elsif($fh eq *STDIN) {        my $buf = ;        print "Client\n";        client($buf);      }      else{        $sel->remove($fh);        $fh->close;      }    }  } }