Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: initialise state variable from list context, NOT!

by JavaFan (Canon)
on Sep 08, 2009 at 16:21 UTC ( [id://794168]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {
        (my $foo, state $bar) = (f(), g());
    ...
    
    foo;
    foo;  # Should g() be called?
    
  2. or download this
    state %record;
    %record = ( ... );
    
  3. or download this
    my %record = ( ... );
    
  4. or download this
    state %record;
    %record = ( ... ) unless keys %record;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-23 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found