You're overwriting the hash value with each new patient. Try:
$practice = {}; foreach $patient(@{$self->{patient_details}}) { push @{ $practice->{ $patient->{suregery_id} } }, $patient; }
It creates an array of patients for each id.
In reply to Re: In a hash with hashes
by BrowserUk
in thread In a hash with hashes
by weezer_316
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |