in reply to pager written in perl?

Writing a pager isn't that hard.

You might want to use sys* commands to avoid Perl buffering:

  • sysopen your file
  • sysseek to the position
  • Read a fixed length block and look for a line ending
  • Show a line if you find a break, read another block if there is no line ending left
  • Repeat the last two steps until as much lines are shown as you like
  • You may want to save the positions of the last line beginnings using systell to directly sysseek to lines above and below the current screen.

    Writing a complete less-like pager may be require more features, but a basic one may also do the job if you're only viewing logfiles.

    I try to use the head and tail Linux commands to limit the number of lines when working with huge logfiles, for example "tail -n 25000 httpd/access.log" to get a day on a medium busy webserver. grep is also good if you're searching for specific information, less and it's coloring will do a good job when viewing the results.