Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    
    ...
    sub replace_ref {
        $_[0] = $_[0]{baz};
    }
    
  2. or download this
    use Data::Dumper;
    use Data::Swap;
    ...
    sub replace_ref {
        swap $_[0], $_[0]{baz};
    }