in reply to print # of lines in window?

Well ... I would just pipe the data through the less command but you could use a combination of Term::Size::ReadKey and Term::ReadKey.

-derby