[root@ test]$ PERLDB_OPTS=RemotePort=localhost:1111 perl -d typeglob
Unable to connect to remote host: localhost:1111
Compilation failed in require.
at typeglob line 0
main::BEGIN() called at /usr/lib/perl5/5.8.8/perl5db.pl line 0
eval {...} called at /usr/lib/perl5/5.8.8/perl5db.pl line 0
BEGIN failed--compilation aborted.
at typeglob line 0正如您所看到的,当程序连接失败时,程序就会失败,exits.How可以让它运行,就好像-d没有在中指定-即。
发布于 2011-07-13 13:36:05
我不明白你想在这里执行的任务。不知道为什么要在这里调用perl调试器?但是我想知道是否有来自CLI命令的返回代码?
如果是这样的话,也许您可以编写一个shell脚本来第一种方式执行perl,如果它返回一个失败的代码,只需将CLI更改为不需要-d开关即可执行。
所以,换句话说,也许有一种perl的方法来做你想做的事情,但是有很多方法可以剥去猫的皮……
https://stackoverflow.com/questions/6674540
复制相似问题