use MLDBM; use Benchmark qw/:all/; use Fcntl; $dbL = tie %lrg_hash, 'MLDBM', 'lrgtest.dbm', O_CREAT|O_RDWR, 0640 or die $!; $dbS = tie %sml_hash, 'MLDBM', 'smltest.dbm', O_CREAT|O_RDWR, 0640 or die $!; @lrg_hash{ 0 .. 20000 } = (); @sml_hash{ 0 .. 10 } = (); $sml_hash{ 5000 } = undef; # Create a hash key of the same name in # %sml_hash as in %lrg_hash. cmpthese ( 5000, { Big => '$lrg_hash{5000}=1;', Little => '$sml_hash{5000}=1;' } ); __OUTPUT__ Rate Big Little Big 3247/s -- -4% Little 3378/s 4% --