} elsif (ref($aref) eq “HASH”){ #This foreach of the hash ref doesn't print anything! foreach $key ( keys %{$aref} ){