in reply to Re^2: passing the reference from a class.
in thread passing the reference from a class.

It works as it should for me:

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.

This is because you're returning strings instead of references:

my @vi = qw(\%hash1 \%hash2);
should be
my @vi = (\%hash1, \%hash2);