%TEST ;
...
for {
sub atest
}
sub atest {
...
push $TEST { TEST1 }[0] = "some value "
}
How do I push values into a hash of arrays without knowing anything about index?
How do I achieve this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This will add value to the end of array stored in hash by “TEST1” key.
I’ve used
@{...}to dereference array reference. Perl creates inner array reference automatically then needed.