Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Lexical scoping like a fox

by ig (Vicar)
on Aug 28, 2009 at 00:00 UTC ( #791779=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $r = "set in file scope";
    
    ...
    }
    
    print "after BLOCK value of \$r is: $r\n";
    
  2. or download this
    at beginning of BLOCK value of $r is: set in file scope
    in conditional statement value of $r is: set in file scope
    at end  of BLOCK value of $r is: set in if condition
    after BLOCK value of $r is: set in file scope
    
  3. or download this
    my $r = "set in file scope";
    
    ...
    }
    
    print "after BLOCK value of \$r is: $r\n";
    
  4. or download this
    at beginning of BLOCK value of $r is: set in file scope
    at end of BLOCK value of $r is: set in BLOCK's scope but formerly: set
    + in file scope
    after BLOCK value of $r is: set in file scope
    
  5. or download this
    my $r = "set in file scope";
    
    ...
        print "\$original is: $original\n";
    
    }
    
  6. or download this
    $r is: set in BLOCK scope
    $original is: set in file scope
    
  7. or download this
    $x = 'x';
    @x = qw(x x x);
    ...
        print "$x,@x : $y,@y : $z,@z\n";
    
    }
    
  8. or download this
    x,x x x : y,y y y : z,z z z
    x,x x x : x,x x x : z,z z z
    x,x x x : x,x x x : x,z z z
    lx,lx lx lx : lx,lx lx lx : x,z z z
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2015-07-31 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls