我正在执行perl脚本中的telnet命令,如下所示。如何在perl脚本中运行telnet命令提示符命令
$telnetOutput = `telnet localhost 4505`;
print "\n telnet command output: $telnetOutput \n";
$clients = `clients`;
print"\n $clients\n";
$clientNumber_or_anyOtherKey = `1`;
print "\n $clientNumber_or_anyOtherKey \n";
$pollers = `pollers`;
print "\n $pollers\n";`
但是运行$ telnetOutput = `telnet localhost 4505
`后;命令,因为我们知道它会打开telnet命令提示符,但所有其他命令仍在执行相同的旧命令prmopt,因此它说clients
或1
或pollers
不会被识别为内部或外部命令。
can any 1 help me out pls? 在advanch中感谢
你需要/要/必须使用CPAN模块为:( – 2013-04-05 12:57:48