Help for this page

Select Code to Download


  1. or download this
    my %hash = ( all => 'old' );       # simple hash value
    foo(\%hash);                       # pass reference to hash
    ...
                                       # this creates a *new* hash and a n
    +ew reference in $ref
                                       # %hash is not modified
    }
    
  2. or download this
    my %hash = ( all => 'old' );       # simple hash value
    foo(\%hash);                       # pass reference to hash
    ...
      $ref->{ all } = 'new';           # overwrite the value to the key 'a
    +ll' 
                                       # in the hash pointed to by $ref (w
    +hich is %hash)
    }