That certain operators (eof, open, etc.) have prototypes that aren't adequate for representing the syntax of the operator is the premise of the question.
For example,
An overridden eof operator can't distinguish whether it was was called as eof or eof() while the real operator does.
open( STDERR , ">&=", STDOUT ) is perfectly valid with the real operator, but throws a strict error with an overridden open.
$ perl <<'.' use strict; open( STDERR , ">&=", STDOUT ); BEGIN { *CORE::GLOBAL::open = sub (*;$@) { } } open( STDERR , ">&=", STDOUT ); . Bareword "STDOUT" not allowed while "strict subs" in use at - line 4. Execution of - aborted due to compilation errors.
Upd: Fixed accidental double negation.
In reply to Re^3: Why does eof have a prototype?
by ikegami
in thread Why does eof have a prototype?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |