Pazitiff has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Monks!

Does anybody know way to read single char from terminal and simultaneous output this char to terminal? Something like "locate" method in GUI elements.

That is algorithm:

  1. user enter in terminal char;
  2. programm immediately show this char;
  3. if user remove char, then programm must remove also the char below

In this case, the input string must not depend on clearing the screen.

In short. How do show list below input line, and clear or complete him depending on entering char.

Very important i want use my program in Windows and Linux!

Sorry for my english :)

Replies are listed 'Best First'.
Re: "Locate" search in terminal
by kcott (Archbishop) on Aug 28, 2013 at 08:09 UTC

    G'day Pazitiff,

    It sounds like Term::ReadKey will do what you want.

    [You originally posted your question in PerlMonks Discussion. I've moved it to Seekers of Perl Wisdom. At the top of each section you'll find a short description of what the section is for. For future reference, please check you are posting in the correct place.]

    -- Ken