Problems? Is your data what you think it is? | |
PerlMonks |
Re: Re: Need help with a variableby Jenda (Abbot) |
on Oct 30, 2002 at 23:54 UTC ( [id://209284]=note: print w/replies, xml ) | Need Help?? |
No it's NOT compiled before the code above. It's EXECUTED before the code above. perl starts from the top, compiles the code as it goes and whenever it encounters the end of a BEGIN{} block it executes the code within that block, whenever it sees a use statement it stops compiling the script, compiles the module (executing the BEGIN{} blocks and processing the uses), executes the code in the module (if there is any outside subroutines) and executes the module's import() function). Then it continues with the script. When it gets to the end of the file it starts executing the COMPILED code outside the BEGIN{} blocks. I hope I'm making sense. Jenda
In Section
Seekers of Perl Wisdom
|
|