Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-11-24 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (351 votes). Check out past polls.

    Notices?