I found an interesting paper published by SANS that introduces Perl as a useful, flexible, and extensible tool for the security practitioner. The paper includes examples of Perl's ability to process log files, grab banners of network services, craft network packets and to exploit code that writes to unchecked buffers.
If you aren't using Perl for such tasks you really should look into it. Its a powerful tool that you will find makes life considerably easier for ya. Especially when doing fault injection testing, test parsing with regex and quick and dirty network test scripts. [Dana Epp's ramblings at the Sanctuary]