I am trying to reboot a system by telnet into it. While executing the reboot command , the system is asking this question "This operation will reboot ! Do you want to continue? (y/n)", now I have to issue the letter "y" through the perl telnet module, how do I do it ?
Here is what I tried but did not helpcommand timed-out at C:\Learn_perl\xcheck_sta.pl line 21use Net::Telnet; my $telnetAC = new Net::Telnet( Timeout => 30,Port => $ACtelnetport ) +or die "connect failed: $!"; line21: $telnetAC->cmd("exe reboot"); $telnetAC->waitfor('/(y/n)/i'); $telnetAC->print("y");
In reply to telnet module by ace_ravi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |