start page | rating of books | rating of authors | reviews | copyrights

Programming Perl

Programming PerlSearch this book
Previous: 7.2.51 Safe - Create Safe Namespaces for Evaluating Perl Code Chapter 7
The Standard Perl Library
Next: 7.2.53 Search::Dict - Search for Key in Dictionary File
 

7.2.52 SDBM_File - Tied Access to SDBM Files

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

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


Previous: 7.2.51 Safe - Create Safe Namespaces for Evaluating Perl Code Programming Perl Next: 7.2.53 Search::Dict - Search for Key in Dictionary File
7.2.51 Safe - Create Safe Namespaces for Evaluating Perl Code Book Index 7.2.53 Search::Dict - Search for Key in Dictionary File