World Wide Web

Developer’s Dilemma: PHP or Perl?

By Editorial Staff

Perl has been around the longest, and because it was not developed for the Web, it was very big, bulky and slow when it first appeared on the scene, according to Keith Greaves, CompTIA manager of Web and electronic initiatives.


 In some ways, it is the scrappy contender versus the tested old-timer, as PHP and Perl duke it out to win developer attention. But more often, the two scripting languages get along just fine, thank you, and developers are glad to have both.”I don’t think you’ll find many battles between PHP and Perl,” said David Ascher, chief technologist at ActiveState, a developer of applied open-source programming tools that was recently acquired by Sophos. “It is true, though, that there are differences in terms of how they are used and what goals they meet.”The choice of scripting languages often depends on the scope of the project, personal choice on the part of the developer and what is being embraced in a certain corporate environment.

Picking and Choosing

Perl has been around the longest, and because it was not developed for the Web, it was very big, bulky and slow when it first appeared on the scene, according to Keith Greaves, CompTIA manager of Web and electronic initiatives.Other languages like PHP, Python and Ruby were developed specifically for Web scripting, and proved to be faster. But Perl has made many improvements that have helped its Web usability.”Since all these scripts are open source they’re still being updated and therefore are gradually changing,” said Greaves. “Just because Perl is the oldest doesn’t necessarily mean it’s irrelevant.”

Personal Preference

Often, the matter of which language to use will come down to simple developer choice, based on their expertise and comfort level with a certain language.”The argument about which flavor of scripting to use can be likened to the argument about which flavor of Linux to use,” said Greaves. “It’s really a matter of personal preference.”Although some argue that Java is the most secure, and therefore deserves to be a favorite, Greaves is not convinced this is the case. “The skill set of the developer must be considered,” he said. “Any code can be made secure in the hands of a skilled developer.”

Tools for the Job

Beyond personal preference, key issues that tend to drive a decision regarding language choice include time to market, scalability and flexibility, portability and speed.”A lot of people who use these languages are pragmatic,” said Ascher. “They’ll use whatever’s appropriate for the job.”PHP tends to be more successful in projects where dynamic Web sites are needed, he added. By contrast, Perl is used when there is more computational sophistication required.”They have very different niches within the Web world,” Ascher said.

Leave a Comment