Building a Database Application
Now that you know which steps you need to take to perform various operations on flat-file databases, and you know how to use file locking to give your programs exclusive access to files when you modify them, I’m going to explain how to perform each of those operations using Perl programs. When appropriate, the examples use file locking to gain exclusive access to the files, and wrap the file modification code in an eval construct so that any errors can be trapped and reported to users in a friendly manner.
The Sample Database
Before I can demonstrate any scripts that make use of a database, I need to explain the structure of the sample database itself. This database is very simple. It contains one record per ...
Get Sams Teach Yourself CGI in 24 Hours, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.