in reply to Perl + Unicode == Networking Woes

Do you need to know the length, or can you just read chunks until it's all read in? And as for writing, you don't have to specify a length. If you don't, it will write the whole scalar. (perldoc -f syswrite)

I guess reading could be a problem, if you end up reading a half-character. If you use read instead, I think you'll be golden.


The PerlMonk tr/// Advocate

Replies are listed 'Best First'.
Re: Re: Perl + Unicode == Networking Woes
by William G. Davis (Friar) on Nov 24, 2003 at 21:11 UTC
    UPDATE:

    No. The size argument to syswrite is only optional as of 5.6.1. And besides, length() is used in many other places (like for generating a content length-style data heading).