exilepanda has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I've read the perldoc CORE, but it didn't mention if I can or cannot override -X (ie. -f, -d, -e etc). I tried this

BEGIN { no strict 'refs'; *{'CORE::GLOBAL::-f'} = sub { print "-f called"; } }
but this won't work. I am trying to build a set of functions that deals with Unicode dirs and files, while maintaining the native syntax. I can override chdir, readdir and sort of, but can't -X. Any clue ?

Replies are listed 'Best First'.
Re: Is that anyway to override -X functions ? (filetest)
by Anonymous Monk on Sep 29, 2016 at 06:23 UTC