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


in reply to Putting an SQLite DB file into memory

Hi, stevieb. I do this all the time, connect to a memory db as
$dbh=DBI->connect('dbi:SQLite:database=:memory:','','',{ PrintError=>0 +,RaiseError=>1 });
then use
$dbh->sqlite_backup_from_file( $filename ) or $dbh->sqlite_backup_to_file( $filename )
as desired.