in reply to How to store and retreive an array of items from within a hashref

It's not printing scalar $A->{arrayholder}), it's printing the scalar value of whatever was assigned to $A->{arrayholder}, since hash elements (incl $A->{arrayholder}) are always scalars.

If you wish to store a list in a hash element, create an array containing the list and store a reference to that array in the hash element. (References are scalars.)

$A->{arrayholder} = [ ]; @{ $A->{arrayholder} } = ( $B1, $B2 ); # -or- #push @{ $A->{arrayholder} }, $B1, $B2; foreach my $B (@{ $A->{arrayholder} }) { ... }

Update: Rephrased text to be a bit clearer.