The code may be described as follows:
- Define a work area, or alias, for the data file, calling it 'pleac'.
- Open the text file within that work area, using define-file-lit.
- Start a loop which iterates through an enumeration of the lines of data in the work area.
- Let a variable contain the data in the current line of the work area.
- Test whether the regular expression works for the current line.
- If it does work, let a variable contain the number found, ...
- ... turn off any output redirection, ...
- ... and redirect output to the file 'pleac_perl_' + the number found (in the same directory as the script).
- End of the if.
- Output the contents of the line.
- End of the iteration.
© Copyright Bruce M. Axtens, 2007