in reply to Re^3: Regex arrow key problem
in thread Regex arrow key problem

I tried your code, with and without lc, and it didn't work still.

Replies are listed 'Best First'.
Re^5: Regex arrow key problem
by ikegami (Patriarch) on Dec 01, 2010 at 19:58 UTC

    Impossible. Either you didn't run the code I gave you, you didn't give me the output you got, or you changed something else.

      I ran the Data::Dumper code and it spit out exactly "\e[C\n" for right and "\e[D\n" for left. I then implemented it exactly as follows.
      if ($input eq "\e[C\n")

        If Dumper says $input contains "\e[C\n", then $input contains "\e[C\n". You're telling me $input doesn't contain "\e[C\n" anymore, so you need to find out what $input contains. You can use Data::Dumper to do that as I've already shown.