Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Read a line with max length ?

by graff (Chancellor)
on Feb 27, 2003 at 22:44 UTC ( #239278=note: print w/replies, xml ) Need Help??


in reply to Re: Read a line with max length ?
in thread Read a line with max length ?

At the point where this statement executes, with $/ having any sort of string value (including the default line terminator):
while (<SOCKETHANDLE>) { ...
I think the potential damage will already be done, if the process at the other end of the socket happens to write, say, 4 GB of data with nothing that matches $/.

(Then again, I could be wrong about that, 'cuz I haven't tested it... does the <> mechanism provide some sort of safe buffering or allocation method to avoid stuffing an impossible amount of data into $_? If so, this seems magical and quite unexpected.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2019-08-17 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (134 votes). Check out past polls.

    Notices?