Define a Report Footer in Perl

PERLServer Side ProgrammingProgramming Scripts

While $^ or $FORMAT_TOP_NAME contains the name of the current header format in Perl, there is no corresponding mechanism to automatically do the same thing for a footer. If you have a fixed-size footer, you can get footers by checking variable $- or $FORMAT_LINES_LEFT before each write() and print the footer yourself if necessary using another format defined as follows −

format EMPLOYEE_BOTTOM =
End of Page @<
          $%
.

For a complete set of variables related to formatting, please refer to the Perl Special Variables section.

raja
Updated on 29-Nov-2019 10:13:57

Advertisements