File Handling in Perl

One of Perl’s attractions to designers is its capability to read and write text files. The attraction lies in the fact that designers can design their sites without having to set up a database (such as Access or MySQL) to store data. However, compared to PHP and ASP, in which the files are sophisticated relational databases, the files can be simple, plain-vanilla text files in a CGI page and Perl—the kind you can create with Notepad or SimpleText. To get started, create a simple text file using Notepad, SimpleText, or your favorite text editor. Begin by creating a list of names, separated by commas, and save them as a text file named customers.txt, as in the following list:

						Lisa,Marge,Homer,Bart,Maggie,Ned,Mo 

Place your ...

Get JavaScript Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.