【发布时间】:2013-03-27 18:08:04
【问题描述】:
我正在 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 不被识别为内部或外部命令。
请问有哪位可以帮帮我吗? 提前感谢
【问题讨论】:
-
你需要/应该/必须为此使用 cpan 模块:(
标签: linux perl tcl telnet perl-module