Paul Krill
Editor at Large

Perl language upgraded

news
Dec 21, 20072 mins

The first major upgrade to the Perl dynamic language in more than five years was released this week, the Perl Foundation said.

Version 5.10 of the open source language adds language features and improves the Perl interpreter itself. While used in Web application development, Perl also can be found in bioinformatics applications such as gene-sequencing, said Perl representative Andy Lester.

A key feature is a smart match operator, which will compare variables in an array and makes it easier for programmers to perform functions such as finding an element in an array or an element in a hash, Lester said. Also featured is a switch statement capability.

Regular expressions have been made more powerful and programmers can now use named captures in regular expressions rather than counting parentheses for positional captures. Recursive patterns are supported for making many useful constructs especially in parsing.

Also included in version 5.10 is state variables allowing variables to persist between calls to subroutines. User-defined pragmata allows users to write modules to influence the way way Perl behaves. Better error messages are highlighted as well.

The Perl interpreter is faster and has a smaller memory footprint. The installation of Perl can be relocated, which benefits systems administrators and operating system packagers, the foundation said. Source code is more portable as well.

Also featured are a defined-or operator, which relates to how Perl keeps track of true or false statements, and field hashes for inside-out objects, for implementing data-hiding in Perl. Data can be hidden so users cannot modify data in an object.

Perl 5.10 can be downloaded here.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author