use Fcntl; #so perl understand what is O_RDONLY use MLDBM; tie %hash, 'MLDBM', 'file', O_RDONLY, 0666; print $hash{"a"}; print $hash{"b"};