in reply to Re: Where and when you should place 'use module;'?
in thread Where and when you should place 'use module;'?
Why isn't the third print Dumper 'correctly misinterpreted'?
I'm not exactly sure, but it looks like perl makes the decision whether that's a filehandle or a function call at compile time, and it doesn't make that decision properly until the symbols are actually loaded (which happens when the use line is reached). And since this is all compile-time behavior, the fact that use is wrapped in an implicit BEGIN block doesn't come into play yet.
|
|---|