Why are you testing while ($bytes_read == 1024) and not simply while ($bytes_read), which would continue as long as at least one byte has been read...?
P.S.: are you aware that there are higher level modules such as LWP for doing HTTP, which encapsulate all those nasty little details?
In reply to Re: Getting sysread to read the full packet
by almut
in thread Getting sysread to read the full packet
by MediocreGopher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |