Passing Data to CGI from HTML

In the previous sections in this chapter, you saw how to place data into a data file and how to pull it out and format it for the screen (format.pl). Using an HTML form and JavaScript, you can create a page that makes it easy to enter the data that you want and have it written to a text file stored in cgi-bin. You can also use JavaScript to help you preformat the data so that it will be easier to pull out and format using Perl.

Setting Up the Front End

The “front end” is where the user interfaces with the data. She enters the data, and it is passed to a CGI page and then written to a text file in a specific format. The interface also should have a means to read the data in the file. Thus, you will probably want ...

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.