#!/usr/bin/perl use strict; use Data::Dumper; my %input = {foo => 'bar', oof => 'wha'}; my_sub(\%input); $input{foo} = 'bar1'; my_sub(\%input); sub my_sub { my $ref = shift; my %args = ( foo => 'oop', pah => 'meh', oof => 'off', %{$ref} ); warn Dumper(\%args); }