in reply to Telnet Session
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.
|
|---|