Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by JavaFan (Canon)
on Sep 08, 2009 at 16:21 UTC ( #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
Node Status?
node history
Node Type: note [id://794168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-10-01 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (38 votes), past polls