Welcome to WebmasterWorld Guest from 188.8.131.52
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! :)