Luiz de Andrade Luiz de Andrade - 5 months ago 8x
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?


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