#!/usr/bin/perl use strict; use warnings; use MyTest; my $h1; my $h2; $h2->{'bar'} = 1; $h1->{'foo'} = $h2; MyTest::mhash2('foo', $h1, 'bar');