One of the nice things about Perl is the huge amount of free codeout there. Available in the form of modules, this code can simplify manycommon tasks while simultaneously offering a powerful toolkit for theexperienced developer. In this article, learn about two of the most popularPerl modules: DBI, used for database connectivity, and Carp, used tosimplify error handling.
One of the nice things about Perl - in fact, the only thing about it that makes wading through all those strange hashes, arrays and regexes worthwhile - is the huge amount of free code Perl developers have access to.
These code "modules", or standalone chunks of Perl code, are usually expressly designed for a specific purpose, and are therefore both focussed and efficient. For example, you might need a piece of Perl code to convert HTML to plain text, or a widget to calculate the value of pi to the 67th decimal place. These and other Perl modules are all available for fre, online - if you know where to look!
Over the next few pages, I'm going to take you on a brief tour of two of the most popular and useful Perl modules out there - DBI and Carp. Read on!
This article copyright Melonfire 2001. All rights reserved.