Help for this page

Select Code to Download


  1. or download this
    $x = { foo => "abc", from => 'x' };
    $y = { bar => "def", baz => "ghi", from => 'y' };
    ...
    my $merged_x = { %$y, %$x };
    
    my $merged_y = { %$x, %$y };
    
  2. or download this
    @{$x}{keys %$y} = values %$y; # Values in $y override values in $x