in reply to Paging on input/file

If you want to roll your own it is easily achieved using % and <>. Piping to more/less is more or less traditional ;-) I recommend you use one of the modules if you want robust and portable, although a straight pipe to more will work on *nix and Win32.

my $lines = 2; while(<DATA>) { chomp; print; $. % $lines == 0 ? <> : print "\n"; } __DATA__ foo bar baz boo

cheers

tachyon