use strict; sub create { my $self = @_; my (%hash1,%hash2); my @vi = qw(\%hash1 \%hash2); return @vi; } my @array = create(); #i did the separation of variables on purpose ... my $first = $array[0]; my $second = $array[1]; my %hashfirst = %$first; my %hashsecond = %$second; __END__ Can't use string ("\%hash1") as a HASH ref while "strict refs" in use at tmp.pl line 20.