On Tue, Aug 11, 2015 at 5:24 AM, Chris Knipe <[email protected]> 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?
j.
--
*John Anderson* • [email protected] • *@genehack* • www.genehack.org
Suck it up, buttercup.