in reply to Re^2: Add an arrayref to a hashref
in thread Add an arrayref to a hashref
To add to ++haukex's answer, if you want to add an item, dereference the array and push to it :
If you don't know the items before you build the aref and store in the href:push(@{ $href->{personal} }, 'birthday' );
push(@{ $href->{personal} }, $_) for @some_list;
Hope this helps!
The way forward always starts with a minimal test.
|
---|
In Section
Seekers of Perl Wisdom