http://www.perlmonks.org?node_id=132399


in reply to Re:x2 Reading RAW POST data
in thread How do I read POST data that is not encoded, and was submitted without a parameter name

Why do you think this code is fragile? It handles both unexpected end of stream (by checking if read returns zero bytes) and it handles errors (by checking if read returns undef). Timeouts should be handled by web server so unless you have some special requirements you should not care about read time.

--
Ilya Martynov (http://martynov.org/)