Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Using Sockets

by Thelonius (Curate)
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).


Comment on Re: Using Sockets
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://264104]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-08-20 19:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (122 votes), past polls