Answer the question
In order to leave comments, you need to log in
How to get a specific element of an array in Perl?
The data is added to the array next. way:
my %thisData = (login => $thisName, pass => $thisPass);
push(@series, \%thisData);
foreach my $el (@series){
print %el{'login'};
}
Answer the question
In order to leave comments, you need to log in
$el is a hash reference. It must be dereferenced before accessing the hash itself:
foreach my $el (@series){
print $el->{'login'};
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question