ok it seems like the chomp it stuffin it up ?
if i removed it i get the correct data but with a \n
On Friday 15 October 2004 11:56, Etienne Ledoux wrote:
> greetings,
>
> This program listens on a port for an incoming connection. Once someone
> connected it asks for a name and a password. but for some reason I can't
> get it to read the name/password entered. what am i missing please...
>
> while (($client,$client_address) = $server->accept()) {
>
> # Get the client ip
> ($client_port, $c_ip) = sockaddr_in($client_address);
> $clientip = inet_ntoa($c_ip);
>
> print $client "\nname\n";
> chomp ($cl_name = <$client>);
> print $client "pass\n";
> chomp ($cl_pass = <$client>);
> print $client "\n$cl_name $cl_pass $clientip\n";
>
> }
>
> e.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>