1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/W/learn/dbfile
Nick Bebout ce9d0bd3d8 1.558
2013-08-03 20:27:37 -05:00

37 lines
750 B
Perl
Executable File

#!/usr/bin/perl
# $Id: dbfile,v 1.1 2013/01/02 16:33:19 gilles Exp gilles $
use strict ;
use warnings ;
use DB_File ;
my %hash ;
my $X = tie %hash, 'DB_File', 'test_dbfile.db' ;
print ( scalar keys %hash, "\n" ) ;
@ARGV and exit ;
for my $num ( 0 .. 255 ) {
print "$num\n" ;
my $key = chr $num ;
for my $num2 ( 1 .. 500 ) {
my $keylong = "$num2 $key" . ( $key x 1024 ) ;
my $val_1 = "V$key" ;
#print "$keylong\n" ;
my $val_2 ;
my $status ;
$status = $X->put( $keylong, $val_1 ) ;
$status = $X->get( $keylong, $val_2 ) ;
my $cmp = $val_1 cmp $val_2 ;
print " $cmp $val_1 $val_2\n" if $cmp ;
#$status = $X->del( $keylong ) ;
}
}