Chapter 17. Perl Meets MySQL—A Perfect Connection

Perl Meets MySQL—A Perfect Connection

Introduction

The user has filled out a form and submitted it with a list of items he wants to purchase. Information for that user is stored in a database in a table called “customers.” You want to open the database and add the new order directly from your Perl program. And you may want to retrieve all the previous orders and product information for that customer and format the data for a Web page, use it in an e-mail message, and send it to a spreadsheet, etc., also from a Perl program. This is all possible with Perl and the Perl DBI module, an object-oriented database interface that allows you to ...

Get Perl by Example, Fourth 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.