Perl 使用 AnyDBM 操作 DBM 文件

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#!/bin/perl
use AnyDBM_File;
dbmopen(%states, "statedb", 0666) || die;
TRY: {
     print "state abbreviation to remove. ";
     chomp($abbrev=<STDIN>);
     $abbrev = uc $abbrev;  
     delete $states{"$abbrev"};
     print "$abbrev removed.\n";
     print "Another entry? ";
     $answer = <STDIN>;
     redo TRY  if $answer =~ /Y|y/;  
}
dbmclose(%states);