Archives

Sunday December 7, 2003

"exotic" features of Perl

A recent question on a Perl mailing list asked about "exotic" features of Perl. My Perl code tends to be pretty pedestrian, I'm afraid. My taste also runs toward explicit use of variables, use of strict and warnings, etc. Basically, I think that the data structures (and occasional algorithms) should be the only interesting parts; the syntax should be as boring as possible.

I've been having some fun with regular expressions and persistent data structures, less fun (but results!) with recursive crawling of XML. I use YAML as the default medium of exchange among my scripts, reading and writing other formats only when forced to (e.g, by existing input or output requirements).

I've also been having some fun with a package called Graphviz, which is willing to draw quite acceptable diagrams (with image maps!) of graphs, if you don't ask too much of it. So, for example, I have diagrammed the data flow of the documentation system, the "use" of packages (read, modules) by other packages, and the table and key relationships of a MySQL database.

All of this is in support of the Flight Software (FSW) group for the Large Area Telescope (LAT) portion of the Gamma-Ray Large Area Space Telescope (GLAST), which is being produced the Stanford Linear Accelerator Center (SLAC). These folks are doing real-time spam filtering, in a situation where 99.9% of the incoming information is noise (read, cosmic rays) and the outbound pipe can only carry away three times the expected real data. Of course, all of this code is being done in C/C++, and Assembler. My own task (massaging the group's metadata and text resources into online documentation) is one in which Perl really shines.

"exotic" features of Perl in Computers , Technology - posted at Sun, 07 Dec, 18:30 Pacific | «e» | TrackBack