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


In reply to Re: When to use modules? by astroboy
in thread When to use modules? by wolfi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.