aqw001 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have lots of dbm files created in perl4. Now I upgrade the scripts to perl5. Does anyone know if there are any perl5 DBM modules that can access perl4 DBM files? Thanks in Advance, Q

Replies are listed 'Best First'.
Re: Access Perl4 DBM File
by btrott (Parson) on Mar 15, 2000 at 02:22 UTC
    As far as I understand it, dbmopen in perl4 used whatever DBM package you had installed. In perl5, you can explicitly state which DBM package you wish to use, using the tie function. So you should still be able to use the DBM files that you created by using perl4. Do you know which DBM package you used?

    Take a look at AnyDBM_File, which provides a "framework for multiple DBMs" (and also has a nice list of the pros and cons of various DBM packages--DB_File is generally the most highly recommended); and tie, the mechanism by which DBM files are used in perl5.