Help for this page

Select Code to Download


  1. or download this
    $\ = "\n";              # automatically add newlines to output
    
    ...
    
    print '$y = ', $y;      # now the last remaining reference to local va
    +r
    print '$$y = ', $$y;    # still 42
    
  2. or download this
    *Foo{SCALAR} = SCALAR(0x511f4)  # original entry in glob
    $x = SCALAR(0x511f4)            # ref to original scalar (same)
    ...
    $Foo = 6                        # change we made via $$x now visible
    $y = SCALAR(0x47650)            # the localized var still around via r
    +ef
    $$y = 42                        # still contains value