Right! scalar %hash on a tied hash returns 0. However, I now understand the principles. In the meantime, however, someone suggested upgrading DB_File to the latest version - and this solved my problem (at least for the time being). Thanks again for your help.