Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

(tye)Re2: Unusual Closure Behaviour

by tye (Sage)
on Jul 13, 2001 at 03:20 UTC ( #96228=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Global symbol "$x" requires explicit package name
  2. or download this
    sub foo {
        my $x= $_[0]   if  ! defined $x;
        print "(@_):", ++$x, " ";
    ...
    print $/, $x= 10, $/;
    foo($_) for( 0,0,5,4,3,0,5,0,4,0,3 );
    print $/;
    
  3. or download this
    (0):1 (0):1 (5):6 (4):5 (3):4 (0):1 (5):6 (0):1 (4):5 (0):1 (3):4
    10
    (0):1 (0):2 (5):3 (4):1 (3):1 (0):1 (5):2 (0):1 (4):2 (0):1 (3):2
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2016-06-25 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.