> Yesterday I had the same principle idea and tried
>
> return length $data;
>
> It worked fine for my two testcases.
> The callback function was called one time more than neccessary,
> but I could live with that.
>
> However, is it guaranteed that length($data) > 0 as long as the end
> of the document is not reached?
> I noticed that $data may be smaller than the chunk size specified
> at registration.
hmm, actually, I already had a number of people post cases to the list
where $data would be of zero length even though there was more data waiting
on the line. Sometimes it just seems that the underlying "select" call
returns a "data ready to read" but then delivers zero bytes :-(
Never really figured out why...
-m
--
Marc Langheinrich
[EMAIL PROTECTED]