in reply to Consolidating data from lots of different sources
A hash of hashes will do that nicely,
The ||= assignment prevents a filled slot from being overwritten by undef.my %hoh; my @labels = qw/SAN_Info Criticality_rating Commission_Date/; while (<>) { my ($key, @dat) = split ','; $hoh{$key}{$labels[$_] ||= $dat[$_] for 0..$#labels; }
After Compline,
Zaxo
|
|---|