#============================= sub my_execer($) { my ($sql) = @_; my $sth = $dbh->prepare($sql) || undef; $sth->execute() || die "sth->execute: $DBI::errstr"; my @row; my @retval; if (@row = $sth->fetchrow_array) { my ($id, $prod) = @row; my $itm = new Item; $itm->id($id); $itm->type($prod); print Dumper $itm; push (@retval,\$itm); } $sth->finish; print "\@retval contains $#retval \n"; return (\@retval); }