Ads by TechWords

See your link here
Receive the latest technology news and information.
Application/Web Development
Computerworld Daily News (First Look and Wrap-Up)
Computerworld Blogs Newsletter
The Weekly Top 10
Cloud Computing
View all newsletters




Privacy Policy
 

Perl

January 7, 2002 12:00 PM ET

Computerworld - Like many Linux and Macintosh fans, devotees of Perl love their technology and defend the language passionately.

Case in point: One major Perl user group doesn't refer to its members as "users" or even "advocates." Instead, it calls them "Perl Mongers."

"Perl attracts people because it's full of nooks and crannies," says Jon Orwant, editor of The Perl Journal and a member of the Perl Mongers advisory board. "The motto is, 'There's more than one way to do it,' and the language allows a creative writing approach. There's always room to learn about neat new ways to do something."

Perl is also a good choice for speedy application development, advocates say.

Small but Complete

Initially developed by Larry Wall in 1987 to automate some Unix administration tasks, Perl has become a popular environment for creating a wide range of applications. It's relatively easy to write small scripts for simple tasks, but the language is powerful enough to satisfy top-notch code jocks.

"Other languages strive to be elegant or very small; Perl strives to be complete and easy to use," wrote Paul Hoffman in Perl for Dummies (Hungry Minds Inc., 2000).

Because Wall solicited contributions from programmers worldwide for both the open-source code and add-on modules, Perl has capabilities far beyond its systems administration roots. It has a robust debugging environment, and its modules aid tasks such as processing HTML and XML data.

Perl includes object-oriented capabilities, which many IT teams prefer for multiperson development projects. However, programmers working on simpler tasks don't need to use objects, and thus the language is useful for both sophisticated Web e-commerce tasks and simple data manipulation.

Perl is one of the most popular languages for creating Web applications—Amazon.com Inc. is among the many well-known Perl users—as well as for developing front-end access to databases and network services. "Most of the Fortune 500 uses Perl," Orwant says.

Many developers still consider Perl an ideal environment for reading, analyzing, manipulating and storing text files. In fact, Perl stands for Practical Extraction and Reporting Language, although the full name is seldom used anymore. To some IT organizations, Perl is attractive when compared with competing technologies because it has been around for a while, so experts have had plenty of time to fix bugs, stabilize the platform and find security holes. Its 14 years trump many other well-known open-source projects, such as Linux and the Apache Web server.

Adam Faust, Web administrator at the Knoxville-based Tennessee Valley Authority, recently used Perl to create a Common Gateway Interface for the power company's Web site. He says the Perl archive network and modules were able to tie in to both the TVA's Oracle database and its IBM WebSphere application server. "In a lot of cases, it's more mature than Java," Faust says.

Platforms Galore

There are ports of Perl source code to run in most major environments, including Unix, Windows, IBM's z/OS, OpenVMS, Novell Inc.'s NetWare and Macintosh. There's even a version for Windows CE, although there's no port yet for Palm OS. Perl isn't considered an ideal choice for things such as embedded applications because of its relatively large memory footprint, notes Orwant.

Advocates of other, more specialized languages also say that Perl's general-purpose flexibility can make it a bit more cumbersome for certain tasks than more targeted languages.

For example, some users of the open-source scripting language PHP say it's easier to develop dynamic Web applications in PHP than in Perl; PHP has some Web functions built in that Perl requires modules to perform. However, many who develop their Web pages in PHP still turn to Perl for other back-end functions.

Perl source code is available for download at no charge from the Comprehensive Perl Archive Network at www.cpan.org, along with numerous modules.

Data Sorting Using Perl

This code opens a text file, sorts the lines of data alphabetically and stores the sorted data in a new file:

open (ORIGFILE,
“unsorted.txt”);
open (FINALFILE, “>sorted.txt”);
print FINALFILE
sort(<ORIGFILE>);
close (FINALFILE);
close (ORIGFILE);

Points of View

PROS
Powerful
Flexible
Relatively easy to learn
Allows quick application development

CONS
Sometimes eclectic syntax
Large memory footprint
Can be more cumbersome for some tasks than more specialized languages


See additional Computerworld QuickStudies

Read more about software development in Computerworld's Software Development Knowledge Center.



Jump to comments

FINALFILE sort

Additional Resources

EFD vs. HDD - What You Need to Know
WHITE PAPER
Enterprise flash drives provide a new Tier 0 storage layer capable of delivering high I/O performance at a very low latency. Proper use of EFDs in an Oracle environment can deliver increased performance compared to fibre channel drives. Read the recommendations for identification of the best DB components for EFDs.
Gartner Research Report: Magic Quadrant for Application Delivery Controllers, 2009
WHITE PAPER
The market for products to improve the delivery of application software over networks remains dynamic and innovative. Vendors focused on solving enterprises' most-pressing application problems have become the top players.
Eight Criteria for Server Load Balancing
WHITE PAPER
Server load balancers are a simple yet highly effective means to scale an application environment while ensuring its availability. Today's solutions should also address application performance and security. Read about the top eight criteria you should consider when choosing a server load balancer and how Citrix NetScaler meets those requirements.

What People Are Saying

White Papers & Webcasts

Three IT Strategies to Cut Cost Intelligently
Register for this Webcast! Provided by BMC Software.

Five Steps to Successful IT Consolidation
Has your Enterprise made the strategic decision to consolidate remote site IT infrastructure into central data centers?  

The True ROI behind WAN Optimization
Looking for solid data behind the cost-savings story of WAN optimization?  

The Workday User Experience Video
Watch Workday's Creative Director, Scott Lietzke, discuss the business-centered design philosophy at Workday.

Forrester Consulting - Optimizing Users and Applications in a Mobile World
Learn how to successfully deploy a WAN optimization solution that is specifically tuned for a mobile environment!  

Business Process Framework Demo
Learn about Configurable Business Processes and Calculated Fields. Watch Now!


IT Jobs