Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(tye)Re2: Unusual Closure Behaviour

by tye (Sage)
on Jul 13, 2001 at 03:20 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://96228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found