Pls let me know how to get the value of the command to one variable.Use Net::TelNet; $telnet = new Net::Telnet ( Timeout=>3600,Prompt => "/$prompt/i",Errmo +de=>'die'); $telnet->open("susan"); $telnet->waitfor('/login: $/i'); $telnet->print('blab'); $telnet->waitfor('/password: $/i'); $telnet->print('blab'); $telnet->waitfor("/$prompt/i"); print $telnet->cmd("hostname"); $hostname = $telnet->cmd("hostname"); print"Host => $hostname\n"; My Expected Output :- Host => osmosun.wmjapan(i.e hostname) Current outuput => 1
In reply to Telnet in perl by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |