answersLogoWhite

0

Which is better Perl or PHP?

User Avatar

Anonymous

11y ago
Updated: 8/16/2019

Every programming language has its uses; "what is better" depends on what you want to use it for.

While Perl was the "original" web programming language for creating dynamic web pages, PHP has mostly superseded it in that arena. That is, PHP is generally a much better fit for creating the content display logic (i.e. "presentation layer") for a web site that has dynamically-created HTML. This is the primary design criteria for PHP, and it is no surprise that PHP outshines Perl for anything but the simplest designs.

On the other hand, Perl retains its crown over practically anything else as the "Duct Tape of systems administration". Particularly on UNIX and Linux systems, where the "everything is a file" and "config files belong in ASCII text format" are the primary design philosophies, Perl's string manipulation powers are unmatched by anything else; in addition, the massive data bank of useful libraries that are hosted in the CPAN (Comprehensive Perl Archive Network) give Perl an enormous variety of pre-written (and, well-documented, too) code that allows the programmer to glue together a Perl program in a much shorter time than any other scripting language.

So, the short answer is this: it depends on what job you're looking to do. For creating anything more than very basic dynamic web sites, PHP should be your choice. For any system Plumbing, text file manipulation, or network plumbing scripting, Perl is the right choice.

One word of caution: Perl well deserves its nom-de-plume of the "Swiss Army Chainsaw" of languages. It is far too easy to create "write-only code" that is obtuse, obscure, and unmaintainable for anyone (including the original creator), so extra diligence is required in Perl to adhere to Good Programming Standards. Perl is fabulous, but make sure that someone can distinguish your program text from line noise.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

What are Perl PHP and Java Servlet's?

Perl, php and Java are all examples of programming languages.


What are the differences between Perl and PHP?

PHP and perl are different kinds of scripting languages. Ultimately they serve the same end and can do the same things; for all practical purposes, one is not necessarily better than the other. However, for a number of reasons having to do with efficiency and practicality, most Web developers these days use PHP. In earlier times, perl was more common.


The PHP syntax is similar to which languages?

Its similar to a number of languages such as C, C++, Java and Perl.


The PHP syntax is most similar to?

Perl and C


How do you edit PHP and Perl scripts?

I am asking the question?>>PHP ,Perl scripts can be edited with help of editors like Editplus,Notepad++ OR you can also use Zend IDE.


Which programming language does PHP resemble?

PHP uses a Perl-like syntax, but is simpler, less consistent and more limited.


Can you use Perl regular expressions in PHP?

Yes, by using the preg_match() function


What language supports associative arrays?

AWK, Perl and PHP are three examples.


What is xampp?

One of the web servers for php which supports coding in PERL programming


What is the use of php in seo?

SEO (Search Engine Optimization) is used for webpages be it php, asp.net or perl. Not the other way round.


Who is founder of php?

Rasmus Lerdorf created PHP (Hypertext Preprocessor) in 1994. Initially, it was a set of Perl scripts, which later evolved into the PHP we know today.


Give two example of server side scripting language?

PHP Perl ASP