Korthrun wrote: > I have written a program in perl that collects some data and prints > it to the screen based on parameters that are given on the command > line (gee original idea for perl eh). Most of the time there are more > lines in the file being printed than there are on my display. I would > like to get it to print out with behavior like more (yes I did try > print `more filename`;). Being able to specify X lines at a time > would rock because then it wouldn't matter what display your on, that > is of course if more like behavior is not possible or way to much of > a hassle. > > I had come across some vague references about being able to set the > "lines per page" out put when reading from a file hand using the > variable $= but the reference was oblique and I never got it to work. > IF anyone can point me to a doc about that or give me a run down of > how that works I would love you forever. Thank much folkses.
I believe that is more for doing a print to a printer vs what is going on the screen. You would need to set it up yourself ( the guru's will let us know if I am wrong). my $MyCnt = 0; my $MyMax = 23; Now you read your file: while (<MYFILE>) { printf "%-s", $_; $MyCnt++; if ( $MyCnt >= $MyMax ) { printf "Please enter any key to print more out"; chomp(my $MyInp = <STDINB>); # # now if you have seen enough last if ( $MyInp =~ /^qu/i ); $MyCnt = 0; } # end of if loop to stop displays } # end of read loop Note: I have not tested this, headed out the door, but it should be a start for you. Wags ;) ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]