I think Higher-Order Perl: Transforming Programs with Programs by Mark Jason Dominus is exactly what you're looking for. The whole book is about applying advanced computer science theories and techniques in Perl.
---
It's all fine and dandy until someone has to look at the code.