Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: Unusual Closure Behaviour

by iakobski (Pilgrim)
on Jul 12, 2001 at 19:54 UTC ( #96081=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo{
      my $x if 0;
    ...
      print "BAR: ", $x--, "\n";
    }
    foo, bar for (1..10);
    
  2. or download this
    sub foo{
      print "FOO: ", $x++, "\n";
    ...
      print "BAR: ", $x--, "\n";
    }
    foo, bar for (1..10);
    
  3. or download this
    sub STATIC_VARIABLE{ 0 }
    
    ...
      STATIC_VARIABLE && my $x;
      print "FOO: ", $x++, "\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-09-16 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (16 votes), past polls