while(1) { &write_log(\*LOG,$program,"Waiting for client to connect..."); while($client = $server->accept()) { $client->autoflush(1); while (<$client>) { chomp; $buffer=substr($_,0,66); # Perform actions with the buffer and get the answer print $client "$answer\n"; &write_log(\*LOG,$program,"SERV -> CLNT <$answer>"); &ora_commit($dbh); } &write_log(\*LOG,$program,"Waiting for client to connect..."); close $client; } &write_log(\*LOG,$program,"Waiting for counter $counter"); $counter = $counter+1; }