Perl or PHP for web work ?

B

Bob

[Crossposted, looking for experts from both for discussion.
Not an argument, just a discussion :-]

As the title says, I'm looking to assess the advantages and
disadvantages of Perl vs. PHP for web (cgi) programming. I'm
a newbie at Perl, and a true novice at PHP but I have lots of
other programming in languages and scripting (eg. ASP) experience.
I know that Perl has the historical advantage in volume and
resources. However, PHP seems to be a strong "up and comer" and
is widely available on web servers.

I think Perl has far greater capabilities as a programming language.
However, it is also _so_ flexible in it's constructs that it is a
little intimidating for someone new to the language. It seems to allow
so many interesting variations that it is at time overwhelming.
(Multiple variables to the left of the assignment statement ? Holy
$hit! :) I know I don't have to use all the variations, but I find
them in other programmers code, so I'll need to know them.

PHP seems to be a lot simpler. That's an advantage when starting out.
But, does PHP run out of power? I don't know enough of it to
tell at this point. So, I'm looking for comments.

Most of what i plan to do is fairly basic web work... dealing with
data in an out of databases, simple business calculations, etc.
Thoughts on which is a better course to pursue ?

Thanks,
Bob
 
J

James

With total disregard for any kind of safety measures Bob
<[email protected] > leapt forth and uttered:

This topic is so old its practically fossilised.


Use PHP. PHP was designed for the web and Perl, for all its
flexibility and power, was not.

Besides, for your purposes there really isn't anything that Perl
can do that PHP can't do equally as well if not better.
I use both Perl and PHP extensively for work and hobbies, there are
certain things that PHP isn't quite there yet with - e.g. handling
XHTML documents ( none of the standard PHP XML modules can cope
with HTML's character entities ); handling POST requests (except with
the massive overhead of cURL )... It's also an extremely verbose
language in comparison to the beautiful compactness of Perl...

It's horses for courses, I would try and use PHP for mainly web-based
applications - but I still find it easier to use Perl in about 10% of
these cases and in more general data munging.

At work I have to use Perl as we leverage a large Perl API for webpages,
with many quite complex mod_perl handlers - yet another things you
can't do with PHP.

J
 
U

Uri Guttman

DB> simple answer - simple language - use PHP

for simple developers doing simple web applications. :)

perl is good for everything else. i will stick with perl.

uri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top