use IO::Socket; my $sock = new IO::Socket::INET ( LocalHost => 'qnxa227', LocalPort => '7070', Proto => 'tcp', Listen => 1, Reuse => 1 ); die "Could not creat socket: $!\n" unless $sock; $sock->autoflush(1); print "The server is up and ready\n"; my $new_sock =$sock ->accept() || die " error $new_sock"; #### This just goes around an infinite loop gathering info while(1){ sleep(2); if( $ARGV[0] eq "l"){ & short; print "\n"; & long; } elsif( $ARGV[0] eq "lp"){ & short; print "\n"; & pfilter; } else { @x = (& short( $new_sock)); print($new_sock $x[0]),"\n"; print($new_sock $x[1]),"\n"; print($new_sock $x[2]),"\n"; } } close($sock);