Read 20 lines when pressing n for next



Hi,
I would like to write a perl script with the following criteria match.
1. open any text file taken the name from the command line.
2. read top 20 lines and stops, then
3. ask to press letter "n or p" (for next/previous) to print next or
previous 20 lines.
would appreciate any kind of help.
4. must have subroutine used.

thanks
.



Relevant Pages

  • Determine if sub exists in module
    ... Is it possible for a Perl script to check if a subroutine exists in a module ... name of one or more subroutines on the command line to another Perl script. ... I know there is some way to get a reference to a subroutine. ...
    (perl.beginners)
  • Re: Read 20 lines when pressing n for next
    ... s> I would like to write a perl script with the following criteria match. ... open any text file taken the name from the command line. ... Good luck! ...
    (comp.lang.perl.misc)
  • RE: setting unix command through perl script
    ... setting unix command through perl script ... it changes the environment of the shell you ... If I run this command on bash prompt then it is executing properly but ...
    (perl.beginners)
  • RE: setting unix command through perl script
    ... I have run the command like this.... ... setting unix command through perl script ... shell you spawn with qx; but after this statement your shell ... To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx ...
    (perl.beginners)
  • RE: setting unix command through perl script
    ... setting unix command through perl script ... Agreed that the parent process in which perl was invoked will not ... To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx ...
    (perl.beginners)