http://www.perlmonks.org?node_id=377145


in reply to Re^2: Combining Ultra-Dynamic Files to Avoid Clustering (Ideas?)( A DB won't help)
in thread Combining Ultra-Dynamic Files to Avoid Clustering (Ideas?)

Care to offer some code for comparison?


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
  • Comment on Re^3: Combining Ultra-Dynamic Files to Avoid Clustering (Ideas?)( A DB won't help)

Replies are listed 'Best First'.
Re^4: Combining Ultra-Dynamic Files to Avoid Clustering (Ideas?)( A DB won't help)
by tilly (Archbishop) on Jul 24, 2004 at 20:19 UTC
    Care to offer some code for comparison?

    I thought that the documentation was pretty clear. But here is a snippet using the older DB_File (because it is what I happen to have installed here):

    use DB_File; my $db = tie (my %data, 'DB_File', $file, O_RDWR|O_CREAT, 0640, $DB_BTREE) or die $!; # Now use %data directly, albeit with tie overhead. # Or use the OO interface (put/get) on $db.