In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Jeff 'japhy' Pinyan) writes:
>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.

And just so the original poster knows *why* they're getting a \r,
the reason is that the standard for line-oriented socket protocols
is to terminate lines with \r\n.  At least, what \r\n is on Unix-type
systems (\015\012); Perl changes the value of \n on some other platforms.
This is why Socket.pm exports upon request the symbol $CRLF, which is
the proper line terminator regardless.

-- 
Peter Scott
http://www.perldebugged.com/
*** NEW *** http://www.perlmedic.com/

-- 
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