I was writing an IRC-related application in C#, and I was parsing the protocol with regular expressions. I didn't know them very well, so I bought a copy of Mastering Regular Expressions. It used Perl for most of the examples (and its largest chapter is about Perl's RE support), and I'd heard Perl was in its own class with regard to text manipulation, so I gave it a go.

Turns out I could eliminate lots of code, due to Perl's terseness (yay Huffman coding), and replace all of the network code with some POE magic. As for regular expressions, I learned that one shouldn't use those to parse IRC (or most other protocols), but rather use some well-tested parser. However, the best module for the job, the one I ended up using, actually uses regular expressions under the hood. :)


In reply to Re: What was the bait (project, problem or opportunity) that hooked you on Perl? by Hinrik
in thread What was the bait (project, problem or opportunity) that hooked you on Perl? by generator

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.