In past Meditations and Wisdom Queries I have complained that I don't use Perl enough to remember it. Knowing this I over comment and tend to have 1000s of code parts laying about my ~/code directory.

I have begun to think that perhaps I should (careful now I have an English degree, please do not try this at home) Teplatize my Perl scripts. I do a lot of log reading, data converging and file creation, or, basically the same things over and over with Perl. As a result I am constantly cutting and pasting old code, not just because I am lazy but because I literally cannot remember how to do what I did last time.

I would use these templates later to build the scripts I need to write now and again. Sort of a personal Perl Cookbook. Like stepping though a file and doing this or that to every entry. Transliterating this for that. Opening and closing files and that sort of thing.

What would you folks "save" to remember later? What do you think is important to Templatize?
--
ellem@optonline.net
There's more than one way to do it, but only some of them actually work.

In reply to Perl Templates by ellem

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.