my $path_to_file= "/tmp/foo.db"; my $result= {}; tie %$result, "DB_File", $path_to_file, O_RDWR|O_CREAT, 0666, $DB_TREE or die "Error: $!";