Or, you could try Berkely DBM or other DBM packages. Look for the dbmopen function on your documentation. There are various DBM packages available, but SDBM comes out of the box with any Perl install on any system.

Having said that, I would also recommend that you take a look at the tie function (even though the standard documentation on it really su*ks, but you can find much better explanations on how to use it)