in reply to long text message problem
The recv call returns when any data is available; the LENGTH parameter is a maximum, not a minimum. So, either you have to loop, or you use a method that implicitly loops, like readline, also known as <>. If your data always ends with a CR and there's no CR in the data, you can:
You don't have to use binmode on sockets. They use bytes by default.$/ = "\r"; $buf = <$new_sock>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: long text message problem
by ikegami (Patriarch) on Mar 11, 2006 at 04:23 UTC | |
by graff (Chancellor) on Mar 11, 2006 at 16:14 UTC |