Can Perl read DB (.db) format files? 
Author Message
 Can Perl read DB (.db) format files?

Hi,

I am trying to get perl5 to read .db files such as /etc/alises and
BSD/OS's /etc/pwd.db (a DB formatted passwd file).  Both of these files
USE to use the old DBM(3) format, but now use this DB(3) format.  

I have had no success in getting dbmopen() to read these files.  Is
there anyway a .db file can be read in perl?

thanks,

Brian

--

UNIX Systems Specialist                         (318) 798-9324



Wed, 26 Aug 1998 03:00:00 GMT  
 Can Perl read DB (.db) format files?
 [courtesy cc of this posting sent to cited author via email]


:I am trying to get perl5 to read .db files such as /etc/alises and
:BSD/OS's /etc/pwd.db (a DB formatted passwd file).  Both of these files
:USE to use the old DBM(3) format, but now use this DB(3) format.  
:
:I have had no success in getting dbmopen() to read these files.  Is
:there anyway a .db file can be read in perl?

Put

    use DB_File;

before your dbmopen.  If you don't have libdb installed though, it
won't help.  Get it from

    http://perl.com/CPAN/src/misc/db.1.85.tar.gz

Try it.  You'll be amazed at how fast my link has become. :-)

--tom
--

Time flies like an arrow
Fruit flies like a banana



Thu, 27 Aug 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. flat file db Vs Aliases.db by Perl.

2. Berkeley DB, DB File on multiple platforms

3. Berkeley DB / DB File Concurrence Problem

4. Berkeley DB / DB File Concurrence Problem

5. format of .db.pag file ?

6. Perl 5.0005_02 fails "make test", db-btree and db-hash tests

7. Trying to look in different db-files [in simple txt.format]

8. Reading a db file, how to do it?

9. Reading records from a db file.

10. reading flat-file db and replacing a word

11. NEWBIE Reading and Searching a Text File Db.

12. reading and writing to dmb file ( .db)

 

 
Powered by phpBB® Forum Software