On 2020-01-21 11:08, William Michels via perl6-users wrote:
Good answers, all. Thanks to everyone for contributing.
For anyone who wants a golfed "cat" replacement, command line
arguments can give you shorter code:

Hi William,

I don't know if I contributed anything at all,
but you are most welcome.

Now for your next homework assignment, write
a "less" substitute in Raku!  You have to read the
keyboard, do a forwards and backwards, and a
search.

man less
DESCRIPTION
    Less is a program similar to more (1), but which allows
    backward  movement in the file as well as forward movement.
    Also, less does not have to read the entire input file
    before  starting,  so  with  large  input files  it
    starts  up  faster than text editors like vi (1).  Less
    uses termcap (or terminfo on some systems), so it can run
    on  a  variety  of terminals.   There is even limited
    support for hardcopy terminals.  (On a hardcopy terminal,
    lines which should be printed at the  top  of  the screen
    are prefixed with a caret.)

    Commands  are based on both more and vi.  Commands may
    be preceded by a decimal number, called N in the
    descriptions below.  The number is used by some commands,
    as indicated.


Like "cat" on steroids!  Probably more fun than writing
Winn API calls!

:-)

-T

Reply via email to