in reply to Store Procedure or Perl program?

You haven't told us what problem you're trying to fix. Are you trying to make it faster? Why do you want to use SQLite if you already have MSSQL?