in reply to In a hash with hashes
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: In a hash with hashes
by AnomalousMonk (Archbishop) on Jan 10, 2010 at 21:57 UTC | |
|
Re^2: In a hash with hashes
by weezer_316 (Novice) on Jan 10, 2010 at 13:56 UTC |