"-e"代表什么?在Perl中的表达式中做什么? [英] What does "-e" do inside an expression in Perl?
本文介绍了"-e"代表什么?在Perl中的表达式中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了这段代码:
unless(-e $SNMPWALK)
{
print "snmpwalk is not installed!\n";
exit 3;
}
-e
在此表达式中的作用是什么?
What is the function of -e
in this expression?
推荐答案
它是文件测试操作符之一.在这种情况下,它将测试名称是否在$SNMPWALK
It's one of the file test operators. In this case it tests whether the file whose name is in $SNMPWALK
exists
它记录在 perldoc -X
这篇关于"-e"代表什么?在Perl中的表达式中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文