--- loncom/debugging_tools/clean_db.pl 2006/06/27 14:35:24 1.3 +++ loncom/debugging_tools/clean_db.pl 2007/04/03 00:59:45 1.4 @@ -4,7 +4,7 @@ # # dump_db.pl - dump a GDBM database to standard output, unescaping if asked to. # -# $Id: clean_db.pl,v 1.3 2006/06/27 14:35:24 albertel Exp $ +# $Id: clean_db.pl,v 1.4 2007/04/03 00:59:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,8 +65,7 @@ if (! $dbref) { warn("Unable to tie to $fname"); exit; } -while (my ($key,$value) = each(%{$dbref})) { - if ($key ne $key_to_remove) { next; } +if (exists($dbref->{$key_to_remove}) { delete($dbref->{$key}); if ($fname =~ m|/nohist_[^/]*.db|) { exit; } my $hist=$fname;