]> matita.cs.unibo.it Git - helm.git/blob - helm/http_getter/tools/dump_db.pl
ocaml 3.09 transition
[helm.git] / helm / http_getter / tools / dump_db.pl
1 #!/usr/bin/perl -w
2
3 # dump on stdout the data contained in a db file.
4 # Print one line for each record in this format
5 #  <key> = <value>
6 #
7 # Stefano "Zack" Zacchiroli <zack@cs.unibo.it>
8 #
9
10 use strict qw(O_RDONLY);
11 use DB_File;
12
13 my $dbfile = shift || die "which db file ?";
14 my %map;
15 tie(%map, 'DB_File', $dbfile, O_RDONLY, 0664);
16 while(($key,$value) = each %map) {
17         print "$key = $value\n";
18 }
19