Any value that is negative in toke.c
can be overridden; all others may not. You can look at the source code here.
For example, let's look at waitpid
on line 10,396:
case 'w':
if (name[1] == 'a' &&
name[2] == 'i' &&
name[3] == 't' &&
name[4] == 'p' &&
name[5] == 'i' &&
name[6] == 'd')
{ /* waitpid */
return -KEY_waitpid;
}
Since waitpid
is negative, it may be overridden. How about grep
?
case 'r':
if (name[2] == 'e' &&
name[3] == 'p')
{ /* grep */
return KEY_grep;
}
It's positive, so it cannot be overridden. That means that the following keywords cannot be overridden:
chop, defined, delete, do, dump, each, else, elsif, eval, exists, for, foreach, format, glob, goto, grep, if, keys, last, local, m, map, my, next, no, package, pop, pos, print, printf, prototype, push, q, qq, qw, qx, redo, return, s, scalar, shift, sort, splice, split, study, sub, tie, tied, tr, undef, unless, unshift, untie, until, use, while, y