in reply to What was the bait (project, problem or opportunity) that hooked you on Perl?

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. :)

  • Comment on Re: What was the bait (project, problem or opportunity) that hooked you on Perl?