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


in reply to Converting from MySQL to SQLite

SQLite's model does not return the number of rows once you execute the statement. The DBI states that not all drivers support this, and SQLite is one of the ones that doesn't support it.

The only way to work this is to try and fetch your rows, and if nothing comes back then you know there were no rows (it's just an inversion of your logic there).