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

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")

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

    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.

      No, it does contain what you said it contains. For some reason though it will not make the arrow keys function for what I want them to.

        If so, the if would work. Can't have it both ways. Which one is it? Does $input contain "\e[C\n" or does the if work?

        Note that it shouldn't contain what you said it contains. There shouldn't be a trailing "\n".

Re^7: Regex arrow key problem
by austin43 (Acolyte) on Dec 01, 2010 at 20:09 UTC
      -