Type of arg 1 to push must be array (not private variable) at searchnews.pl line 52, near "@shows)" #### my ($stmt, $shows, $allshows); for my $i ( 0 .. $#ids ) { $stmt = "SELECT * FROM shows WHERE id = '$ids[$i]'"; &execute_it( $stmt ); #sub that prepares and executes while ($shows = $sth->fetchall_arrayref({})) { push ($allshows, $shows); } } print Dumper ($allshows);