Define a Pagination in Perl

PERLServer Side ProgrammingProgramming Scripts

What about if your report is taking more than one page? You have a good solution in Perl to create pagination. We simply use $% or $FORMAT_PAGE_NUMBER variable along with header as follows −

format EMPLOYEE_TOP =
===================================
Name                   Age Page @<
$%
===================================
.

Now your output will look like as follows −

===================================
Name                  Age Page 1
===================================
===================================
Ali                   20
2000.00
===================================
===================================
Raza                  30
2500.00
===================================
===================================
Jaffer                40
4000.00
===================================
raja
Updated on 29-Nov-2019 10:09:51

Advertisements