in reply to AVG returns COUNT

From the DBI perldoc:

Returns the number of rows affected or undef on error. A return value of -1 means the number of rows is not known, not applicable, or not available.


So, you have to use some other method as specified above, to get the select result, the do only returns the number of afected rows.