http://www.perlmonks.org?node_id=134393


in reply to Re: Output question
in thread Output question

I don't see why you should write your pager as '| more' will work both on unices and windoze...

But, If you want to do it anyway, a simple test in front of each print :
if(++$line > $LINEMAX) { $line=0; getc; }

should be enough for simple/small scripts...
Or to be a little bit cleaner, using print2 instead of print, whith print2 defined like this :
sub print2 { if(++$line > $LINEMAX) { $line=0; getc; } print @_; }

UPDATE :
Term::ReadKey May be more appropriate than getc.
Anyway you got the idea...
UPDATE2 :
This answer is for oaklander, I replied to the wrong post. Apologizes (especially to Hotshot).

"Only Bad Coders Code Badly In Perl" (OBC2BIP)