mercredi 24 février 2016

What does -e do in this if-clause in Perl

I am looking through some Perl code and I got to this part:

foreach (@somevar) {
  if (-e "$_/$anothervar") {
      $boolflag=1;
      last;
  }
}

Yet I can't figure out what -e does. I am thinking the string afterwards is a path (deriving from its structure) but that's as far as I understand what is happening.

I looked for -e in the Perl help, but I don't understand how -e from this definition would work in an if-clause.

-e program        one line of program (several -e's allowed, omit programfile)

Aucun commentaire:

Enregistrer un commentaire