... #push the data onto our results while ( my $resultRowRef = $sth->fetchrow_hashref() ) { my $attrHash; $attrHash->{OBJECT} = $resultRowRef->{'ATTRNAME'}; $attrHash->{OBJECTATTRIB} = $resultRowRef->{'ATTRNAME2'}; push (@$result, $attrHash); } ...