in reply to SQLite select or

You need to escape the percent signs, which are intended for SQL, such that they are not intrapolated by perl.

             When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren