http://qs321.pair.com?node_id=1211391


in reply to Re^2: Is there any way to override "file test operator"?
in thread Is there any way to override "file test operator"?

I read back through this thread. Now that I see it again, the question appears to be "how can I make new file test operator?".
I don't know how to do that.

Overriding an existing file operator (like: -e $filename) is very bad idea. I stick to that opinion. The issue is when I see a line like that in some huge amount of code, I expect -e to do what it normally does without having to read any previous code that redefined that operation. And BTW, I don't know how to redefine -e either.

In this case, I would make a subroutine that did the desired test and use that. In terms of execution efficiency, I see no difference. In terms of source code, there would be a huge increase in clarity.