> I'm output a massive list to STDOUT but wish to break it like the MORE > function in DOS. For instance I have a huge array and for each row the > array I'm outputting to STDOUT. But when the output reaches the end of the > page, I would like to pause it. What's the best way to do this? > > thanks > Chuck
Chuck, This is what I use in a program that mimics the Unix head command: # After you have displayed a line, assuming that $Displayed equals zero at # the start of the script: $Displayed++; # Prompt the user each time after a block of 45 lines has been displayed. if (($Displayed % 45) == 0) { print(STDERR '<Return> to continue with this file...'); $Prompt = <STDIN>; last if (length($Prompt) > 1); } Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters 636-922-9158 ext. 8652 fax 636-447-4471 [EMAIL PROTECTED] www.nisc.cc _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs