Not long ago, David Smith proclaimed... > I wrote a perl TCP/IP client program that talks to a server. The server > sends me ASCII over the scoket, but it appends a NULL byte to every string > (0x00), which I discovered with file redirection and a hex editor (it was > invisible in the shell output). How can I prune this byte off of the > string in Perl? I tried chomp, but it appears to only remove \r and \n. I > also tried s/\s+$// but \s doesn't appear to match the 0x00 character.
You could try chop (the old, less smart and more dangerous version of chomp).
--
[EMAIL PROTECTED] is Doran L. Barton, president, Iodynamics LLC
Iodynamics: Linux solutions - Web development - Business connectivity
"Guests are requested not to smoke or do other disgusting behaviours in
bed."
-- Tokyo hotel's rules and regulations
pgpWYC80JsYp8.pgp
Description: PGP signature
.===================================. | This has been a P.L.U.G. mailing. | | Don't Fear the Penguin. | | IRC: #utah at irc.freenode.net | `==================================='
