Luiz de Andrade Luiz de Andrade - 1 year ago 65
Perl Question

What does "-e" do inside an expression in Perl?

I ran into this piece of code:

unless(-e $SNMPWALK)
print "snmpwalk is not installed!\n";
exit 3;

What is the function of
in this expression?

Answer Source

It's one of the file test operators. In this case it tests whether the file whose name is in $SNMPWALK exists

It's documented in perlfunc under perldoc -X