On Thu, 2004-08-26 at 13:26, Etienne Ledoux wrote:
> My program starts with a menu with options. That being one of the options to 
> choose from. Once it is done it returns to the main menu again so you can run 
> other options again. I would like to be able to do this within my program 
> somehow if possible. If not, I guess I could run it with |more from the 
> command line then.
> 

In that case you will have to build that intelligence in your code
for eg If you are printing all elements of an array @ARRAY.
Let us say you print 20 lines in a page and wait for "enter"


$|=1;          # to prevent buffering
my $PAGESIZE = 20;
foreach(@ARRAY){
  do_printing($_);
  if( $. % $PAGESIZE == 0){ 
   print "\nPress Enter to continue ";
   <STDIN>;
   }
}
__END__



HTH 
Ram



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to