Would anybody have any idea why chomp is deleting the value ?

No matter how I try and do it. I even tried s/\n//,$value . afterwards I have 
a empty value. I don't understand what I'm doing wrong here and everywhere i 
check this it seems to be the right way to do it. mmmm ?!?!

e.

On Friday 15 October 2004 12:16, Etienne Ledoux wrote:
> 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>


Reply via email to