Basic HTML version of Foils prepared March 30 97

Foil 63 PERL as a Practical Extraction and Report Language

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


PERL is designed to produce simple reports with a format that allows close control over what appears where on the output page. The general syntax is reminiscent of Fortran!
We need to describe format definitions, write to output formats and data, and a rather peculiar way of associating formats with files
The syntax is a little cleaner in PERL5 where filehandles are almost true objects with methods. Here specify
  • use English; # to specify that both long understandable and short cryptic names are allowed
  • use FileHandle; # which allows you to set variables associated with FILEHANDLE by
  • method FILEHANDLE EXPR; # to set method=EXPR or alternatively use
  • FILEHANDLE->method(EXPR); # where allowed methods are many such as
  • open, close, format_name, seek ......



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997