my $sth = $db->{ 'dbh' }->prepare( $sql ); if ( $sth->execute() ) { my @rows = (); while ( my $ref = $sth->fetchrow_hashref() ) { push @rows, $ref; } return @rows; }