use Tie::Hash::DBD; tie my %hash, "Tie::Hash::DBD", "dbi:SQLite:dbname=db.tie"; # now use hash as normal