Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Lexical scoping like a fox

by ig (Vicar)
on Aug 28, 2009 at 00:00 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://791779]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found