PHP or Perl?

Perl has been a popular language for developing Web applications. But is it better than PHP for creating dynamic Web applications? Opinion is split among programmers.

Many who like to get under the hood and have a great deal of control favor Perl. And as a general-purpose language, Perl has more capabilities and a more robust debugging environment than PHP.

In Perl, many Web tasks require add-on modules, whereas PHP uses built-in functions. Some see this as a disadvantage, while others say it lets programmers pick the best implementation for a given task.

Perl's power and flexibility can make it more difficult to learn and use. "You can't do as much with PHP, but those restrictions allow novices to pick up PHP more quickly than Perl, because there are fewer ways to go wrong," says Jon Orwant, editor of The Perl Journal.

Many programmers use both. "I personally use a combination of PHP and Perl for many of my projects: Perl mostly for back-end tasks, while I have PHP doing all the front-end work," says PHP inventor Rasmus Lerforf. "You could do the front end in Perl, but it would be a bit more work."

— Sharon Machlis

Copyright © 2002 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon