Perl stores page number in the $% variable.
# Top-of-page format, displays page number. format WORKORDER_TOP= Starfleet Work Orders, page @<<< $% .