Help for this page

Select Code to Download


  1. or download this
    my %d = ("foo", "bar"); sub fs { $_[0] = "quux"; } fs(values %d); prin
    +t join(" ", %d), $/;
    # OUTPUT: foo quux
    
  2. or download this
    my %d = ("foo", "bar"); sub fi { ${$_[0]}[0] = "quux"; } fi([values %d
    +]); print join(" ", %d), $/;
    # OUTPUT: foo bar
    
  3. or download this
    my %d = ("foo", "bar"); sub fi { ${$_[0]}[0] = "quux"; } sub capture {
    + \@_ } fi(capture(values %d)); print join(" ", %d), $/;
    # OUTPUT: foo quux