Just another Perl shrine | |
PerlMonks |
RE: CHOMP VS. CHOPby Jonathan (Curate) |
on Aug 02, 2000 at 13:22 UTC ( [id://25687]=note: print w/replies, xml ) | Need Help?? |
Are you connecting to a Unix server from a windoze client? Domestos has a two characters at the end of a line. A line feed and a carriage return. Unix has just the line feed. I wrote a win32/unix client server app recently and didn't have any problems with the conversion. I wouldn't use a chop instead of chomp here but I doubt the carriage return is a random event. I've tried to re-create the problem with the following code on NT and Solaris but I'm afraid it works fine for me? Server code on a unix box
And the client
Produces; Got this message: >my string ends here< In my experience some ftp/udp/tcp clients leave the ^M on and some don't. If you have it check out Russ's node Removing ^M
In Section
Seekers of Perl Wisdom
|
|