sub print { my $self = shift; my ($hashref) = @_; # print the reference address: print $hashref; # dereference the hashref and print the content: print %{$hashref}; }