ace_ravi has asked for the wisdom of the Perl Monks concerning the following question:
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");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: telnet module
by runrig (Abbot) on Aug 27, 2013 at 23:53 UTC | |
|
Re: telnet module
by roboticus (Chancellor) on Aug 28, 2013 at 00:00 UTC | |
|
Re: telnet module
by DanielSpaniel (Scribe) on Aug 28, 2013 at 04:20 UTC | |
|
Re: telnet module
by jellisii2 (Hermit) on Aug 28, 2013 at 13:26 UTC |