##
while() # reads first entry
{
my @newusername = ; # reads remaining entries
foreach $name (@newusername)
...
## ##
...
my $found;
while (my $name = ) {
if ($name eq $user) {
$found = 1;
last;
}
}
unless ($found) {
print $client_socket "ERR\n";
...
exit;
}
print $client_socket "ACK\n";