in reply to use SDBM_File like a database

An SDBM_file is like a hash - it works in a key/value combination.

I'm guessing that your REQ column is the primary key for your data. So for the "insert" you need to do something like this:

@cols = qw(INQFILE SENT RECVD STATS); $h{$col_vals->{REQ}} = join('|', @$col_vals{@cols});
Here I just store the data in pipe-delimitted format, which might break depending on what you have in the data.

Retrieving the data is left as an exercise :-)

Michael