From the PHP I've seen/messed with, perl and PHP are pretty similar in syntax. I can tell you first hand that perl is powerful for everything. As far as your project is concerned, you may want to use both, but I don't think that you would need perl. It seems that an algorithm such as this would be fairly simple to write (just much repetition and db queries). Let us know how you decide to do it!
