http://www.perlmonks.org?node_id=995388


in reply to Number of elements in array

If you want to get the number of rows in a database table, the most efficient way would be to let the database count them:
...prepare ("Select COUNT(*) FROM TABLE_OR_QUERY"); # TABLE_OR_QUERY can be another (SELECT...) statement
Most databases will optimize queries, so you can do the count query, then do the data query as 2 separate queries.

             I hope life isn't a big joke, because I don't get it.
                   -SNL