On 09/08/2017 11:41 PM, ToddAndMargo wrote:
Hi All!

I am trying to convert some Perl 5 code to Perl 6.

What do I use in place of
     use Term::ReadKey qw ( ReadKey ReadMode );

I am trying to convert the following:

<code>
use Term::ReadKey qw ( ReadKey ReadMode );

sub DumpKeyboard () {
    # Dump the contents of the keyboard buffer, if any
    my $Trash;

    ReadMode 4; # Turn off controls keys
    while  ( defined ( $Trash = ReadKey ( -1, \*STDIN ) ) ) {
       # print "\$Trash = $Trash\n";
    }
    ReadMode 1; # Reset tty mode before exiting
}

</code>




This guy maybe?

https://github.com/krunen/term-termios/blob/master/README.md

I can't tell what he is saying.

And his example wont read a carriage return


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to