I've been writing perl for about 2 months. It's the first programming language I've had anything to do with since I learned BASIC on my TRS-80 as a kid. (Unless we count Javascript, but there I was mostly cutting and pasting to put some doo-dads on my web pages, something that has lost its charm.)

Since I knew HTML pretty well and had some specific needs (e.g., character encoding), I "rolled my own" instead of learning CGI.pm. The fact is, I didn't know I was supposed to do any different. The few example scripts I happened to come across all printed HTML directly instead of generating it via a module.

Coming (finally) to the point. Because I was unaware of the module, I came to learn a bunch of neat things on my own. Trying to get perl to parse other people's pages was hellish, as was trying to print output in a variety of encodings (based on user configuration), but it taught me a bit about regular expressions that I might not have learned otherwise. And learning how to parse forms led me to investigate pack.

In short, I approached things as opportunities for exploration as much as tasks that needed to be done. (Since this is a hobby, I'm lucky to have that leisure.) Eventually, discussions here and on usenet (where I went when I couldn't figure things out for myself) led me to rethink how I had been coding certain things. But I'm not sure it would have been better to be exposed to this sage advice first, or be handed a module, because I might have missed a good opportunity to exercise my wits on a problem.

BCE
--Your punctuation skills are insufficient!


In reply to A beginner's perspective by BorgCopyeditor
in thread Use modules or roll your own? by kvale

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.