in reply to When to use modules?
When I first started learning Perl, I did things via first principles too. In fact, I used to do things the same way I did in UNIX shell scripts. For instance, I used "system" to host out of my Perl script to call Oracle utilities to load data into a database, because that's what I did with ksh. Now I use DBI (unless I have very high volumes of data)
The fact is, modules make the hard things possible. After spending 6 months writing everything I did from scratch, I bought a copy of The Perl Cookbook. If you haven't got it yourself, then you should get it asap. Scan the contents and see how many recipes you could write without using modules. The fact is, excluding trivial examples, modules enable you to connect to databases and mail servers, to write network servers and clients, parse languages, create and process graphics and pdf files, and interface with any number of commercial products. Try doing any of these from scratch!
BTW: why use CGI.pm? Have a look at Use CGI or die by Ovid
|
|---|