DB_File 1.71 / Berkly DB Hash and sendmail /etc/aliases.db 
Author Message
 DB_File 1.71 / Berkly DB Hash and sendmail /etc/aliases.db

Hello,

i am having some trouble opening the /etc/aliases.db file on my linux
machine. I am using the
following small script to read and write the values of the DB file.
#!/usr/bin/perl

use DB_File;
use vars qw( %h $k $v ) ;
tie %h, 'DB_File', './test-aliases.db', 'O_CREAT|O_RDWR' , '0666',
$DB_HASH || die "$!";

$h{"apple"} = "red" ;
$h{"orange"} = "orange" ;
$h{"banana"} = "yellow" ;
$h{"tomato"} = "red" ;

while (($k, $v) = each %h)
   { print "$k -> $v\n" }

untie(%h);

The program terminates normally, but with no output and none of the
values get written to
the file. The output of file command shows following :
/etc/aliases.db: Berkeley DB Hash file (Version 2, Little Endian, Bucket
Size 4096, Bucket Shift 12, Directory Size 256, Segment Size 256,
Segment Shift 8, Overflow Point 1, Last Freed 2, Max Bucket 1, High Mask
0x3, Low Mask 0x1, Fill Factor 65536, Number of Keys 38)

Maybe somebody can help me out.

    Christian Braun.
   Nikoma MediaWorks GmbH



Fri, 26 Apr 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

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

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

3. $DB::alias question

4. DB::alias - howto ?

5. $LINEINFO undefined in &DB::DB when using noTTY mode

6. Berkeley DB, DB File on multiple platforms

7. Berkeley DB / DB File Concurrence Problem

8. DB failures on DEC Alpha if DB created elsewhere

9. Berkeley DB / DB File Concurrence Problem

10. hash of hashes in Berkeley DB?

11. DB failures on DEC Alpha if DB created elsewhere

12. Can Perl read DB (.db) format files?

 

 
Powered by phpBB® Forum Software