Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Need help with a variable

by Jenda (Abbot)
on Oct 30, 2002 at 23:54 UTC ( [id://209284]=note: print w/replies, xml ) Need Help??


in reply to Re: Need help with a variable
in thread Need help with a variable

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://209284]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-20 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found