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}{@a} ) { print $i; } #### foreach my $i ( @a ) { print $i; }