in reply to DBM problem
If you're concerned, you can simply create a new DBM. If you've got enough memory, pull the hash into memory, close the DBM, delete the files, and reopen it and re-store, like:
dbmopen %FOO, "my_db", 0666 or die; ... populate %FOO ... delete some stuff from %FOO { my %TEMP = %FOO; # cache it in memory dbmclose %FOO; unlink <my_db*>; # danger, but general enough {grin} dbmopen %FOO, "my_db", 0666 or die; %FOO = %TEMP; }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Rea: DBM problem
by baku (Scribe) on Feb 15, 2001 at 21:11 UTC | |
by japhy (Canon) on Feb 15, 2001 at 21:14 UTC | |
by baku (Scribe) on Feb 15, 2001 at 21:17 UTC | |
by merlyn (Sage) on Feb 15, 2001 at 22:53 UTC | |
|
Re (tilly) 2: DBM problem
by tilly (Archbishop) on Feb 15, 2001 at 23:13 UTC | |
by merlyn (Sage) on Feb 15, 2001 at 23:42 UTC | |
|
Re: Re: DBM problem
by Pahrohfit (Sexton) on Feb 15, 2001 at 21:48 UTC |