On Oct 15, Etienne Ledoux said: >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 ?!?!
The problem is that your data ends in \r\n, and the \r is a carriage return. If you print "jeff\rABC", you'd *see* "ABCf", because the \r causes the cursor to go to the beginning of the line, thus overwriting previous letters. In your case, apparently the IP address is longer than both the username and the password, so the IP is all you're seeing. ($user = <$client>) =~ s/\r?\n$//; ($pass = <$client>) =~ s/\r?\n$//; That should work for you. -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://japhy.perlmonk.org/ % have long ago been overpaid? http://www.perlmonks.org/ % -- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>