robpennington84 has asked for the wisdom of the Perl Monks concerning the following question:

How would I go about using autoflush() on the Input_log created in the Telnet session below??
$jun_session = new Net::Telnet (Timeout => 10, Input_log => "Juniper/MIA/Status.log", Prompt => '/rpenn\@.*\>/');
I ran into a problem where one of the configuration files my script was pulling from a router was exceeding the maximum input buffer length of 1048576. Did some research and found the autoflush function which sounds like it will skip buffering all together.

Replies are listed 'Best First'.
Re: Autoflush Net::Telnet Input_log??
by moritz (Cardinal) on May 01, 2010 at 14:54 UTC

    Pass a file handle instead of a file name to Input_log. You can enable autoflush on the handle before you pass it on.

    Perl 6 - links to (nearly) everything that is Perl 6.