Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Using Sockets

by Thelonius (Priest)
on Jun 08, 2003 at 14:29 UTC ( #264104=note: print w/replies, xml ) Need Help??


in reply to Using Sockets

The problem is here:
local $/; my $data = <$fh>;
This slurp mode means that the read won't return until end of file on $fh. If you want to read everything that's available, use read or sysread. When read or sysread returns false (0 or undef), you have reached end of file (i.e. socket close).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://264104]
help
Chatterbox?
[stevieb]: thanks choroba for making the world right again by mentioning something as simple as a missing backslash ;)
[beech]: s/a/many a/\
[beech]: compare MANIFEST.SKIP

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2017-07-25 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (383 votes). Check out past polls.