Welcome to WebmasterWorld Guest from 220.127.116.11
You have a couple options here. You can use Perl as you already found out. My personal favorite is PHP. It really depends on what you are more knowledgeable in, what your server has as far as programming languages, and what will suit your needs best.
If you are happy with what you found then I guess all I can say is best of luck! :)