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
In reply to Re: Paging on input/file
by tachyon
in thread Paging on input/file
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |