aspose file tools*
The moose likes PHP and the fly likes PHP, or Perl, or something else for this task? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » PHP
Bookmark "PHP, or Perl, or something else for this task?" Watch "PHP, or Perl, or something else for this task?" New topic
Author

PHP, or Perl, or something else for this task?

Thomas Kennedy
Ranch Hand

Joined: Jan 20, 2008
Posts: 137
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?
Nick Charles
Ranch Hand

Joined: Oct 09, 2011
Posts: 71

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.
 
Don't get me started about those stupid light bulbs.
 
subject: PHP, or Perl, or something else for this task?