Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Closure Over Scalar?

by stevieb (Canon)
on Feb 18, 2021 at 16:33 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found