On Tue, Aug 11, 2015 at 6:58 AM, John SJ Anderson <j...@genehack.org> wrote:

> On Tue, Aug 11, 2015 at 5:24 AM, Chris Knipe <sav...@savage.za.org> wrote:
>
>>
>>
>> my $numBytesToRead = 512;
>>
>> my $buffer;
>>
>> while ($bytesRead = read($TCPSocket, $buffer, $numBytesToRead)) {
>>
>>   if ($buffer =~ m/\r\n\.\r\n$/) {
>>
>>     print $buffer;
>>
>>     last;
>>
>>   }
>>
>> }
>>
>>
>>
>> I’m obviously doing this wrong :(  Can anyone perhaps show me the light?
>>
>>
> Don't you need to put $bytesRead into $buffer at some point?
>

Wow, and this is why we don't review the code before the coffee... 8^/

j.


-- 
*John Anderson* • j...@genehack.org • *@genehack* • www.genehack.org
Suck it up, buttercup.

Reply via email to