Just let less do its thing for you.
- Either pipe the output from your program to less:
yourApp | less
- Or do the same thing from within the program with a piped open:
open LESS, '| less' or die $!;
select LESS;
## print stuff as normal.
...
select STDOUT;
close LESS;
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.