#!/usr/bin/perl use strict; use warnings; use Test::More; use Data::Dumper; my $master_ref = { one => "first", two => "second", }; sub return_hash_ref { return { three => "third", four => "forth" }; }; print "Before ".Dumper( $master_ref ); $master_ref = ( $master_ref, return_hash_ref() ); # line 18 print "After ".Dumper( $master_ref ); ok( $master_ref->{ one } eq 'first', 'one' ); ok( $master_ref->{ two } eq 'second', 'two' ); ok( $master_ref->{ three } eq 'third', 'three' ); ok( $master_ref->{ four } eq 'forth', 'four' ); done_testing;