#!/usr/bin/perl
#
# eg8: use tie to convert an SDBM to a Berkeley DB
#
use strict;
use warnings;

use Fcntl;
use SDBM_File;
use DB_File;

tie(my %secret, 'SDBM_File', 'secrets-sdbm', 
	O_RDWR, 0666
   ) || die "oops, couldn't tie SDBM";
tie(my %newsecret, 'DB_File', 'secrets-bdb',
	O_RDWR|O_CREAT, 0666
   ) || die "oops, couldn't tie BDB";

%newsecret = %secret;                   # shazam!

untie(%newsecret);
untie(%secret);
