Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Is this BEGIN construct supposed to work?

by ikegami (Patriarch)
on Nov 02, 2011 at 23:47 UTC ( [id://935521]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub routine {
       state %hash = ...;
       ... %hash ...
    }
    
  2. or download this
    my %hash;
    BEGIN { %hash = ...; }
    sub routine {
       ... %hash ...
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found