1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
die "cant create dbmtest" unless dbmopen(%keys, "dbmtest", 0666);
print "Writing...\n";
$keys{'key0'} = 0;
$keys{'key1'} = 1;
$keys{'key2'} = 2;
$keys{'key3'} = 3;
$keys{'key4'} = 4;
$keys{'key5'} = 5;
$keys{'key6'} = 6;
$keys{'key7'} = 7;
$keys{'key8'} = 8;
$keys{'key9'} = 9;
$keys{'key10'} = 10;
$keys{'key11'} = 11;
$keys{'key12'} = 12;
$keys{'key13'} = 13;
$keys{'key14'} = 14;
$keys{'key15'} = 15;
$keys{'key16'} = 16;
$keys{'key17'} = 17;
$keys{'key18'} = 18;
$keys{'key19'} = 19;
$keys{'key20'} = 20;
$keys{'key21'} = 21;
$keys{'key22'} = 22;
$keys{'key23'} = 23;
$keys{'key24'} = 24;
$keys{'key25'} = 25;
$keys{'key26'} = 26;
$keys{'key27'} = 27;
$keys{'key28'} = 28;
$keys{'key29'} = 29;
$keys{'key30'} = 30;
$keys{'key31'} = 31;
$keys{'key32'} = 32;
$keys{'key33'} = 33;
$keys{'key34'} = 34;
$keys{'key35'} = 35;
$keys{'key36'} = 36;
$keys{'key37'} = 37;
$keys{'key38'} = 38;
$keys{'key39'} = 39;
$keys{'key40'} = 40;
$keys{'key41'} = 41;
$keys{'key42'} = 42;
$keys{'key43'} = 43;
$keys{'key44'} = 44;
$keys{'key45'} = 45;
$keys{'key46'} = 46;
$keys{'key47'} = 47;
$keys{'key48'} = 48;
$keys{'key49'} = 49;
$keys{'key50'} = 50;
$keys{'key51'} = 51;
$keys{'key52'} = 52;
$keys{'key53'} = 53;
$keys{'key54'} = 54;
$keys{'key55'} = 55;
$keys{'key56'} = 56;
$keys{'key57'} = 57;
$keys{'key58'} = 58;
$keys{'key59'} = 59;
$keys{'key60'} = 60;
$keys{'key61'} = 61;
$keys{'key62'} = 62;
$keys{'key63'} = 63;
$keys{'key64'} = 64;
$keys{'key65'} = 65;
$keys{'key66'} = 66;
$keys{'key67'} = 67;
$keys{'key68'} = 68;
$keys{'key69'} = 69;
$keys{'key70'} = 70;
$keys{'key71'} = 71;
$keys{'key72'} = 72;
$keys{'key73'} = 73;
$keys{'key74'} = 74;
$keys{'key75'} = 75;
$keys{'key76'} = 76;
$keys{'key77'} = 77;
$keys{'key78'} = 78;
$keys{'key79'} = 79;
$keys{'key80'} = 80;
$keys{'key81'} = 81;
$keys{'key82'} = 82;
$keys{'key83'} = 83;
$keys{'key84'} = 84;
$keys{'key85'} = 85;
$keys{'key86'} = 86;
$keys{'key87'} = 87;
$keys{'key88'} = 88;
$keys{'key89'} = 89;
$keys{'key90'} = 90;
$keys{'key91'} = 91;
$keys{'key92'} = 92;
$keys{'key93'} = 93;
$keys{'key94'} = 94;
$keys{'key95'} = 95;
$keys{'key96'} = 96;
$keys{'key97'} = 97;
$keys{'key98'} = 98;
$keys{'key99'} = 99;
$keys{'key9998'} = 9998;
$keys{'key9999'} = 9999;
print "Done\n";
dbmclose (%keys);
die "cant read dbmtest" unless dbmopen(%rkeys, "dbmtest", undef);
$i = 0;
print "Reading...\n";
while (($key, $val) = each %rkeys)
{
if ($keys{$key} != $val)
{
print 'Incorrect val ', $key, ' = ', $val, ' expecting ', $keys{$key}, "\n";
$i = $i + 1;
}
}
print "Done\n";
dbmclose (%keys);
print $i, "Error(s)\n";
|