Programming Perl

Programming PerlSearch this book
Previous: 7.2.44 Math::Complex - Complex Numbers PackageChapter 7
The Standard Perl Library
Next: 7.2.46 Net::Ping - Check Whether a Host Is Online
 

7.2.45 NDBM_File - Tied Access to NDBM Files

use Fcntl;
use NDBM_File;

tie(%hash, NDBM_File, 'Op.dbmx', O_RDWR|O_CREAT, 0644);
# read/writes of %hash are now read/writes of the file, Op.dmx.pag
untie %hash;

See Perl's built-in tie function. Also see under DB_File in this chapter for a description of a closely related module.


Previous: 7.2.44 Math::Complex - Complex Numbers PackageProgramming PerlNext: 7.2.46 Net::Ping - Check Whether a Host Is Online
7.2.44 Math::Complex - Complex Numbers PackageBook Index7.2.46 Net::Ping - Check Whether a Host Is Online