in reply to Building Hashrefs

For hash refs:

my $hash_ref = {}; # valid hash_ref, empty hash $hash_ref->{'key'} = 'value'; # hash now contains one k-v pair # but hash_ref unchanged
The following code is just dereferencing an array ref.
@{$q_mail}