Question:

What are advantages of perl over php? 10+ to most useful ?

by Guest65536  |  earlier

0 LIKES UnLike

?

 Tags:

   Report

2 ANSWERS


  1. The only three I can think of is that perl is installed by default on Linux OSs and can be run straight away as an application on the system. The $_ and <HANDLE> code things are nifty but the code does become confusing and is more difficult to debug that PHP.

    On the other hand PHP is far more superior and more logical.


  2. PHP is basically simplified Perl, tailor-made for the Web. Perl is a serious, involved programming language.

    For most web apps, PHP really can't be beat, it's easy to learn and most Forums/CMS/Blogs and just about everything else is written in PHP. It seems like everyone is learning PHP. PHP is replacing Perl for web apps, but it will never replace Perl for everything, you can write a web program easily in PHP, but you can write a web server easily in Perl.

    Web apps is Perl are generally made using mod_perl, an apache module written in C that embeds a Perl interpreter and allows you to write full-fledged apache modules directly in Perl. This isn't exactly for the faint of heart. But it is an unbeatable way to write serious web apps.

    Some facts:

    Perl apps using mod_perl are generally as fast or faster than PHP for most things.

    PHP was originally written in Perl, as a Perl module.

    Perl has a very stable and mature database package called DBI. It provides a database-independant interface.

    PHP is missing many features that are considerd vital in a serious language.

    PHP's deliberate lack of advanced features, and the web features that are included in the core language make it very easy to learn and use. You don't even need to be a programmer to use PHP.

    Perl is not harder to read than PHP. In fact, superficially the languages look almost identical.

    But if you want to know which is better to use, I say PHP is a better choice for most web apps. If you need something very complex, or something that must do programming tasks that are generally beyond the scope of web apps, use Perl;

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions