Hashmat Khan wrote: > > For the timeout, I used a very large value, so its solved ! > > One more issue, 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 > > 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', ); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/