From Net::Telnet on CPAN:
($prematch, $match) = $obj->waitfor($matchop);
[...]
You can specify more than one pattern or string by simply providing multiple Match and/or String named parameters.
Use waitfor to wait for your prompt and the shutdown message. Try
$match =~ /The system is going down for reboot/
when waitfor returns to decide if you got a prompt or shutdown message.
In reply to Re: Telnet Session
by Sewi
in thread Telnet Session
by cjay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |