For programming in general, Perl is definitely the winner, due to PHP's limited scope. PHP does have its strong points, when compared to straight CGI Perl (without mod_perl or the like).

I am not familiar with PHP's performance statistics. But one big win PHP has over Perl is, it's easier for designers to deal with "A little bit of code stuck into my html" than it is for them to deal with finding the HTML embedded in a Perl script (especially one that uses the CGI module instead of big print blocks). This is the problem that HTML::Mason tries to solve. Overall HTML::Mason looks like all the benefits of PHP, except you get to work in Perl instead of PHP.

If you're trying to work closely with a designer, or trying to teach a non-programmer how to do a few easy scipting things, PHP is probably the answer. In the long run, it's definitely worth learning Perl, and solving designer interface issues with something like HTML::Mason.


In reply to Re: Compare Perl vs PHP by ferrency
in thread Compare Perl vs PHP by Ignorance

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.