Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to run a telnet command as below,however after running the command,user needs to press "y" or "n",How can I input an "y" after running the command,please advise ?

$telnet = new Net::Telnet(Timeout => 60, Host => "92.16.10.11", Input_log=>$input, Output_log=>$output +) or die "Telnet failure"; $telnet->login("root", "root") or die "Cannot login"; my @clean= $telnet->cmd("mk -b 1024 /tmp/hd")

Replies are listed 'Best First'.
Re: How to provide a user input for a telnet command
by toolic (Bishop) on Jun 29, 2011 at 19:10 UTC