Contrary to what BrowserUK said, it seems like your usage is consistent with what Net::Telnet expects. Having looked at the source code, "-max_buffer_length" and "-Max_Buffer_Length" should also work. Or, you could use the method call on the object itself:
my $obj = Net::Telnet->new( … ); $obj->max_buffer_length( 50*1024*1024 );
But I would be very surprised if that behaved any differently.

It would be helpful to know how you are trying to fetch the input into your script. If you aren't using $obj->get(); maybe you should be. If you're using any sort of line-oriented method, it does seem strange that a remote process could spew many MB of data without ever emitting something that looks like a line termination, but that could happen.

Anyway, if that's what you're dealing with, obj->get() will just give you arbitrary pieces as you call it (and as input becomes available). I presume you know what you're supposed to do with such data, and can figure out how to parse your way through the pieces...


In reply to Re: telnet max buffer exceeded by graff
in thread telnet max buffer exceeded by newkij1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.