What does “-e” do inside an expression in Perl?

前端 未结 1 336

I ran into this piece of code:

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

What is the function of <

1条回答
  •  粉色の甜心
    2020-12-11 13:03

    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

    0 讨论(0)
提交回复
热议问题