I have several Perl scripts which I
find useful when working with Fortran programs. Most are more fully
documented in the SPEM manual (available from me) and all have
descriptive comments in their header.
The first group modifies your source code:
Note - these usually work on the kind of Fortran I write, but they have
been known to do the wrong thing. DO NOT DELETE YOUR ORIGINAL CODE
BEFORE CHECKING THE NEW CODE.
put a continue or enddo on each do loop
fortran indent - needs continue or enddo on do loops
Sverre Froyen's program to put fortran labels in order
turn do-enddo loops into do-continue loops (for nasty old compilers)
add a '!' before comments which start in column 73
convert f77 to f90 free
add space around 'if' statements, can also convert to f90 operators
I also have tools for building Fortran makefiles using the X11
imake program and a Perl5 makedepend script.
configuration files for all the Fortran compilers I have
ever tried and a sample Fortran Imakefile. It contains a README
file which tries to explain how they work and how to use them.
search source files for C preprocessor includes, Fortran includes, and
F90 module dependencies. Requires Perl 5. The old versions of this
program are available via ftp from the
These Perl slides were originally from Tom Christiansen. I have
converted them to the LaTeX seminar style and added a few Perl 5
These slides are from a short talk I gave about regular
expressions, based on the Perl man pages.
two slides per page, postscript file
one slide per page, postscript file
LaTeX2e source for Perl slides, uses seminar package