I do the same, with one extra step. I have a "sandbox" directory, and another directory inside it called (for lack of a better name, and for legacy reasons :) "goodstuff".

When I have used a snippet more than 3 times I take the time to make it into a bullet-proof, well documented, subroutine and move it to "goodstuff". Eventually I would like to start grouping them into ones I use together often and package them into modules, but I only have so much time :).

The other directory in my sandbox is called "test". It contains a very generic network client that attaches to any port or protocol, a few text files with strings that have broken my parsing in the past, and other little dev tools I use to avoid "Making The Same Mistake Twice", or just as little test programs while developing larger things. I find this dir invaluable, having a network client, text files to test parsing, and those types of thing always around so I don't have to rewrite them every time I start writing a server or daemon or even little log parsers, is just a huge time saver.

Oh and ++ on this node, it might be a given for many, but for any newbies this node will be gold :)

"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!

In reply to Your own bag-o-tricks - and one further by Rex(Wrecks)
in thread Your own bag-o-tricks by vek

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.