The Overriding Built-in Functions section of the perlsub documentation provides
There is a second method that is sometimes applicable when you wish to override a built-in everywhere, without regard to namespace boundaries. This is achieved by importing a sub into the special namespace
CORE::GLOBAL::.
and then gives a few examples. At the end, however, is
Finally, some built-ins (e.g.
existsorgrep) can’t be overridden.
What is the full list?
Any value that is negative in
toke.ccan be overridden; all others may not. You can look at the source code here.For example, let’s look at
waitpidon line 10,396:Since
waitpidis negative, it may be overridden. How aboutgrep?It’s positive, so it cannot be overridden. That means that the following keywords cannot be overridden: