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