Basic HTML version of Foils prepared March 30 97

Foil 3 General Remarks on PERL

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


Note PERL is an Interpreter and is a cross between C, the UNIX Shell, sed and awk. I certainly consider it easier than all four of these as even when these other approachs work, PERL produces clearer code (than especially the UNIX Shell) which is easier to write and debug.
We describe PERL4 which can be invoked by putting PERL in an executable file (chmod +x on UNIX file) and making certain first line is (at NPAC)
  • #!/usr/local/bin/perl
We will later describe PERL5 which was released late 1994 and is analogous to C++ in same way PERL is analogous to C
Note C as a compiler will be more efficient than PERL. We use PERL for those tedious high level things which take a long time to write but don't take much execution time.
  • Computationally intensive loops should be coded in C (or equivalent) and called from PERL
  • Note PERL is comprable to C for I/O and UNIX system calls but can be thousands of times slower than C for arithmetic.



© 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