This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
My task includes a bit where I need to have the Apache web server read a text file - which I hope will be XML but I don't control that -- do a transform on it (if it's xml of course) and treat it as part of the content of the page. My background is in Java and JSP, so doing this sort of thing *on Apache* is somewhat unfamiliar territory. My first thought is to use PHP. But is there a reason I should use Perl (meaning, I guess, Mason) instead? One reason I ask is that PHP is not installed, and getting it installed would be another rock to push up the hill. On the other hand I'm not sure how widely used Mason is, while the web is full to bursting with php examples. Is one of these options easier, or technically better than the other?
My other thought is, no one here is going to learn Mason just to support this tiny project, while php is pretty intuitive and non-threatening. Suggestions?
A while back we needed a script written and I had one of our college interns write it. He produced a Perl script that did exactly what we needed. When we pointed out that noone else on the team knew Perl he stated that we'd have to learn some scripting some time and it might as well be Perl. Anyway, after he left and we needed to make changes to the script, someone else re-wrote it in a language we were more comfortable with (might have been Java, but it has been a long time and I just plain don't recall). I'm no PHP expert (though I play one at work), but I haven't had any problems writing PHP apps or correcting quirks in PHP apps such as Drupal and Mantis. So I would say that anyone reasonably familiar with standard structured programming languages (C, Java, etc) should be fairly comfortable working with PHP (provided you don't make use of too many PHP tricks, and there are lots of them).
Anyway, my 2 cents.
subject: PHP, or Perl, or something else for this task?