in reply to get the value from a refernce array of hash
Locate the key that matches the name Feynman.
my $surname = 'Feynman'; my @matching_ids = grep { $accounts{$_}{surname} eq $surname } keys(%accounts);
Make sure @matching_ids has at least one matching record.
die("No records matching surname $surname\n") if !@matching_ids;
Handle multiple matches as you see fit.
Get the transactions. They are located in
@{ $accounts{$id}{transactions} }
|
|---|