How can I identifying control characters in Perl?

Posted by sganesh on Stack Overflow See other posts from Stack Overflow or by sganesh
Published on 2010-03-17T05:14:47Z Indexed on 2010/03/17 14:51 UTC
Read the original article Hit count: 264

Filed under:
|
|

I want to implement the command line features like in a linux terminal. I saw this in ftp command also.

  • If I press tab I need to list the commands.
  • If I press control characters I need to get that characters based on that I will do some action.
  • And if I give any commands it should execute.

For this I tried with Term::ReadKey that is in non-canonical mode. But here I am facing more problems like if I press any control character or arrow I got three characters. For the up arrow I got ASCII 27 91 65.

Can anyone help me out of this problem?

© Stack Overflow or respective owner

Related posts about perl

Related posts about terminal