Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Closure Over Scalar?

by stevieb (Canon)
on Feb 18, 2021 at 16:33 UTC ( #11128528=note: print w/replies, xml ) Need Help??


in reply to Closure Over Scalar?

You can force initialization at compile time by wrapping the assignment in a BEGIN block:

my $FIXED_STRING; BEGIN { $FIXED_STRING = 'fixed_string'; } my %persistent;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2022-05-20 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?