my %hash = map {
join(':', $_->{Computer},
$_->{Bulletin},
( $_->{Product} || "" ),
$_->{Status}
) => $_
} @{GetQueryTable('all_records_for_report', 138)};
or
my %hash;
for ( @{GetQueryTable('all_records_for_report', 137)} ) {
$hash{"$_->{Computer}:$_->{Bulletin}:"
. ($_->{Product}||"")
. ":$_->{Status}"} = $_;
}
Well, the map-based approach puts the focus on the fact that you're populating %hash. Where you're getting the data from is secondary. The for-based approach puts the focus on the fact that you're doing something with each element in all_records_for_report. What you're doing with it is secondary.
--
Yours in pedantry,
F
o
x
t
r
o
t
U
n
i
f
o
r
m
"Anything you put in comments is not tested and easily goes out of date." -- tye