Reputation: 149
I see Perl scripts using -e
, for example unless -e
I understand the unless
loop, but not the -e
part. An explanation would be nice. When should -e
be used?
Upvotes: 6
Views: 10485
Reputation: 425
It's to check if a file exists.
http://perldoc.perl.org/functions/-X.html
Upvotes: 8