"How do I delete a line from a file?"

(Strategies for Lightweight Databases)

Length: 3 hours

Prerequisites: Basic familiarity with Perl is required.

Description

New 20071107: Now available online for free!

Donations please

As of October 2009, I am unemployed. If you find these materials useful or entertaining, please contribute some money to support my work.

Thank you.

Many programs need cheap, convenient access to small amounts of data. There are two commonly used solutions: Flat text files and DBM files. This class will look at these in detail. Whether you're looking for a good solution for storage of your own data, or you have to deal with data stored in one of these formats by another program, this class will equip you with valuable tools for solving your problems.

In the first section, we'll look at techniques for managing flat text databases and the systems programming that underlies these. We'll examine the tradeoffs of variable vs. fixed-length records and sorted vs. unsorted files. In the second section, we'll take a detailed look at Tie::File, a new standard module that provides easy access to text databases.

The third section will be an overview of Perl's 'DBM' feature, including a comparison of the standard DBM modules. We'll see several extremely useful but little-known features of DB_File, the only one of these standard modules that doesn't have serious defects.


Complete Table of Contents

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

"How do I delete a line from a file?"

Other materials


Return to: Universe of Discourse main page | Perl Paraphernalia | Other Classes and Talks

mjd-perl-yak+@plover.com