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

I tried implementing it within my code instead of in its own script and it returns $VAR1 = undef;. EDIT: I accidentally put it above ReadMode(0); and that's why it returned undef. Now I put it below the $input string and it returns
RIGHT ARROW
$VAR1 = "\e"; $VAR1 = "["; $VAR1 = "c";
LEFT ARROW
$VAR1 = "\e"; $VAR1 = "["; $VAR1 = "d";

Replies are listed 'Best First'.
Re^3: Regex arrow key problem
by ikegami (Patriarch) on Dec 02, 2010 at 00:47 UTC
    So only one of the three characters is returned at a time. BrowserUK has already posted how to handle that.