Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: Reading Single Characters from the standard input

Perl: Reading Single Characters from the standard input
{filelink=13229}

#!/usr/bin/perl -w
  use Term::ReadKey;
  ReadMode('cbreak');
  print "Press keys , Ctrl-C to exit.n";
  while (1)
  {
      $myKey = ReadKey(0);
      last unless defined $myKey;
      printf("Decimal Code: %d	 Hex Code: %xn", ord($myKey), ord($myKey));
  }
  ReadMode('normal');

Users who found this page were searching for:

  • tkinter menu
  • how to set a static textfield java from a drag and drop netbeans
  • remove duplicate list items java

No comments yet.

Leave a Comment