in reply to using dbi to set database variables
Why not just add this "variable" as a value in a table record? Even a table that is just 2 columns, a primary key and a value.