print $ref->{c}; # This gave me 55 which is what I want. foreach my $i ($ref->@a) { print $i; # I want to see the content of the array, this gave me an error. } foreach my $i ($ref->%b} { print $i; # I want to see the content of the hash. }