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):
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 $/.while (<SOCKETHANDLE>) { ...
(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.)
|
---|
In Section
Seekers of Perl Wisdom