sub do_something { my ( $normal_arg1, $normal_arg2, $optional_hashref ) = @_; my $hashref = $optional_hashref || { }; # # ...time passes... # $hashref->{ return1 } = "foo"; $hashref->{ return2 } = "bar"; return $hashref; } my %hash; my %newhash = do_something( $this, $that ); do_something( $this, $that, \%hash );