Open DBM up for read write access : DBM « Database « Perl






Open DBM up for read write access

   

#!/usr/bin/perl
use warnings;
use strict;
use POSIX;
use SDBM_File; # or GDBM_File / NDBM_File / AnyDBM_File...

my %dbm;
my $db_file="demo.dbm";
tie %dbm, 'SDBM_File', $db_file, O_RDWR, 0;

   
    
    
  








Related examples in the same category

1.Creating and Assigning Data to a DBM File
2.Opening an MLDBM database is similar to opening a regular DBM database:
3.Reads DBM file, printing entries with tie and untie function
4.Store hashes in a DBM file:
5.Using DBM databases with reports
6.Write out data into a DBM database
7.Copying from One DBM Format to Another