> >>> I get this error: > >>> maximum input buffer length exceeded: 1048576 bytes at D:\Docs\Perl > >>> \scripts\ > >>> ti_p2k_bld.pl line 33 > > >>> This could be because $prematch is gets a very big string and so it > >>> exceeds the limit which I had suspected before. > >>> Bottomline, I want to get the $match value. How can I do this ? > > >> Please try to remember to bottom-post your responses to this group. > >> Thanks again. > > >> You can disable the timeout by specifying a value of undef, for instance > > >> my $t = new Net::Telnet (Timeout => undef); > > >> You can't use waitfor like that. Regular expressions must be passed as > >> strings like '/Build completed on/' but I think it's neater to use the > >> string option like this > > >> my ($prematch, $match) = $t->waitfor( > >> String => 'Build completed on', > >> String => 'Build failed on', > >> ); > > > ok...thanks. > > > what do you mean by bottom-post the response ? > > I am having one new problem, > > > when I use this: @lines = $t->cmd($bldcmd) ($prematch, $match) = > > $t->waitfor(Match => /Build completed on/ || / Build failed on/); I get > > this error: > > maximum *input buffer length exceeded*: 1048576 bytes at D:\Docs\Perl > > \scripts\ > > ti_p2k_bld.pl line 33 >
That's fine, but the actual problem is this: $t = new Net::Telnet (Timeout => 0xFFFFF, # very high value #Prompt => $prompt, Dump_Log => "dump_log.txt", Output_log => "dump_out.txt", Input_log => \*STDOUT) .... later $ok = $t->cmd(String => $bldcmd); This command is a build command, and it takes long time to build. Maybe half to one hour. And it outputs the files compiled, linked etc. So the output is very huge and that is the reason it complains maximum input buffer length exceeded: 1048576 bytes at D:\Docs\Perl \scripts\ti_p2k_bld.pl line 33. How do I avoid this without increasing the input buffer size ? thanks Hashmat -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/