http://www.perlmonks.org?node_id=564901

Thanks to explorer for posting this concise list of common delusions about Perl so frequently repeated by certain members of the PHP "community". The hidden agenda of vendetta against a competitor is transparent and we shouldn't let them get away with it. Lies of this magnitude do real damage to Perl, and they're being actively promoted by people affiliated with a greedy for-profit corporation, think about it.

PHP code gets embedded into HTML pages, unlike Perl.

This is ABSURD. Embedding Perl in HTML is TRIVIAL with mod_perl, if that's what you really want to do, and MANY other more powerful techniques exist. From Perl Server Side Includes:

"Another feature of mod_perl is that it integrates with the Apache mod_include server-side include system. Provided that mod_perl was built with the PERL_SSI option (or with the *recommended* setting of EVERYTHING=1), the Perl API adds a new #perl element to the standard mod_include server-side include system, allowing server-side includes to call Perl subroutines directly.

The syntax for calling Perl from SSI documents looks like this:

<!--#perl sub="subroutine" args="arguments"-->
This example calls a Perl subroutine that it creates on the fly. It looks like this:
<!--#perl arg="Hello" arg="World" sub="sub { my($r, @args) = @_; print qq(@args); }" -->
  • Note: "This feature works only when mod_perl is not built as a DSO (i.e., when it's built statically)."

    PHP is built from the ground-up with database functionality built in, particularly MySQL functionality. Perl is not.

    Perl allows YOU to decide what database to use, if any, and PHP seems to be following Perl, as usual, towards a more modular approach:

    PHP 101 (part 9): MySQL support in PHP 5.0 is not as simple as it used to be. Instead of supporting MySQL out of the box, PHP now requires you to make all kinds of decisions about versions and libraries before allowing you to hook your scripts up to a MySQL database.

    PHP is secure. Perl scripts tend to have more security holes.

    WRONG AGAIN. Not only is PHP itself well-known to be less secure than Perl, as john_oshea demonstrates with his link comparison, evidence suggests PHP applications are the LEAST secure LAMP choice, while those written in Perl have the BEST code quality.

    Coverity Study Ranks LAMP Code Quality:

    "The pillar of most open source applications is the ubiquitous LAMP -- Linux, Apache, MySQL, and Perl/PHP/Python stack. According to results of a Coverity study, the LAMP stack has fewer code defects than a baseline of 32 open source software projects."

    "Of the LAMP stack, Perl had the best defect density well passed standard deviation and better than the average, Chelf said.

    Perl had a defect density of only 0.186. In comparison Python had a defect density of 0.372 and PHP was actually above both the baseline and LAMP averages at 0.474."

    PHP is easy to learn in comparison to Perl.

    Perl is actually EASIER to learn than PHP because things like function names and their return values are MUCH more consistent, to name just one of many reasons.

    PHP takes less "overhead" than Perl, meaning that PHP scripts will run faster than CGI scripts written in Perl

    mod_perl is actually FASTER than mod_php.

    PHP code tends to be more consistent and modular than Perl.

    Let's be honest, to the untrained eye Perl and PHP and look identical, and this author is obviously completely ignorant that the best collection of modules for any language in the world exists for Perl at http://cpan.org/.