#!/usr/bin/perl -w use strict; use Fcntl qw(O_RDWR O_CREAT); use MLDBM qw(DB_File Storable); .... tie(%positions_hash, 'MLDBM', 'positions.db', O_CREAT|O_RDWR, 0640) or die "Could not create db file\n"; #write positions hash to db file untie %positions_hash;