Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Ranch Hand
Posts: 71
PHP Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic