O'Reilly logo

Games, Diversions & Perl Culture by Jon Orwant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. PDL: The Perl Data Language

Karl Glazebrook

Frossie Economou

Since this article was originally written, PDL has evolved considerably and adopted a large modular structure. The PDL functions now number in the hundreds, preventing us from listing them all. However, the principles behind PDL are unchanged, and this article remains a good introduction to them. It has been slightly updated to reflect the latest PDL version.

Extolling the virtues of Perl and its many uses to the readers of TPJ is preaching to the converted. Nevertheless, there is one fundamental area in computing where Perl has been conspicuously absent: number crunching and data analysis.

Tarred by the same brush as other scripting languages, Perl (which in fact is semi-compiled), is perceived as too slow and memory-devouring for heavy numerical computations because it doesn’t lend itself to storing and retrieving zillions of numbers quickly. This has been a source of great frustration to the authors, both enthusiastic Perl (ab)users who resent being forced to use more primitive environments for their astronomical data analysis. Perl’s potential for manipulating numerical data sets speedily and elegantly via an extension was obvious. Hence PDL, the Perl Data Language, was born. PDL is a Perl extension, so you get the convenience of programming in Perl with the speed of compiled C.

PDL introduces a new data structure: the “pdl numerical array,” often referred to as a “piddle.” (This unfortunate nickname has led ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required