HI, I'm new in Perl word, right now am try to telnet a group of host, in the first instants is all right(login,password,command.logs etc), but the i have to introduce a "mml" command, in that case the promt change, and the script doesn't work any more , I'm try to get "last prompt" but may be something is missing...
The prompt change often, eg.
 
XXXX [07 Sep 2006 15:07:04] #1:
XXXX [07 Sep 2006 15:07:10] #2:
 

foreach (@hosts) {
 $t=new Net::Telnet (Timeout => 15,Errmode => 'die',Dump_Log   => 'c:\sgu_d.log',
                         Input_log  => 'c:\sgu_i.log',Output_log => 'c:\sgu_o.log', Prompt => '/[\$%#>: ] $/
');

$t->open($_);
$t->login($username,$passwd);
@lines1 = $t->cmd($com1);
$t->cmd($com2);
$string = $obj->last_prompt;
#$prev = $obj->last_prompt($string);
$t->cmd($string);
print $string;
#$t->waitfor($string);
@lines2 = $t->cmd($com3);
@lines3 = $t->cmd($com4);

print @lines;
print @lines2;}
print $string;
exit 0;



--
J.E.Solares
+502 5 2049926
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to