in reply to BEGIN block and prototyped subroutines
While the following does the job, and I'm ok with it, I'm curious as to why the BEGIN block doesn't work. Can anyone provide some enlightenment?
Because the parses sees the call of foo before the declaration (yes, the "called too early" warning happens at compile time). A BEGIN block further down the file is still parsed later than the lines before it.
|
|---|