[comp.lang.perl] PostScript file for Tom Christiansen Slides

alanm@cognos.UUCP (Alan Myrvold) (06/25/90)

In article <130@sun13.scri.fsu.edu> nall@sun8.scri.fsu.edu (John Nall) writes:
>This is the PostScript version of Tom Christiansen's slides for
>doing a dog-and-pony-show with Perl.  All credit is his - the only
>thing that I have done is to make the ascii file into a PostScript
>file (and make a few capital words).

Nifty ... I like the slides, but I really like having a footer at the
bottom of each page with the page number (especially the way I fumble
around with slides).

So here's a filter to munge the PostScript file to put page numbers
at the bottom of each page:

--- cut here ---
#!/usr/local/bin/perl

# Put page numbers at the bottom of the ascii.out PostScript file

while (<>) {
   @a = split;
   if ($a[$#a] eq '_ep') {
      $footer = sprintf("TC:perl %2d",++$pg);
      s/_ep/8300 400 _m ($footer)_S _ep/;
   }
   print;
}
--- cut here ---

                                          - Alan

---
Alan Myrvold          3755 Riverside Dr.     uunet!mitel!sce!cognos!alanm
Cognos Incorporated   P.O. Box 9707          alanm@cognos.uucp
(613) 738-1440 x5530  Ottawa, Ontario       
                      CANADA  K1G 3Z4