in reply to Problem pushing hashref results
or, simply create it in place:... #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); } ...
BR... #push the data onto our results while ( my $resultRowRef = $sth->fetchrow_hashref() ) { push (@$result, \{ OBJECT => $resultRowRef->{ATTRNAME}, OBJECTATTRIB => $resultRowRef->{ATTRNAME2} }); } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem pushing hashref results
by caelifer (Scribe) on Oct 26, 2006 at 17:30 UTC |