package Tool; use strict; sub new { # construct... } sub _init{ # initialise... } sub create { my $self = @_; bla bla... create %hash1 , %hash2 ... my @vi = qw(\%hash1 \%hash2); return @vi; } ############## main program ################# use strict; use lib "./temp" use Tool; ... my $tree = Tool->new(); my @array = $tree->create(); #i did the separation of variables on purpose ... my $first = $array[0]; my $second = $array[1]; my %hashfirst = %$first; my %hashsecond = %$second; ######## and now it dumps %hashfirst on " print Dumper(%hashfirst)"; but it doesn't want to dump the second one (%hashsecond)...