in reply to Arrow keys with Curses.pm
I know this is not exactly what you want, but you may want to look at Curses::Simp I think that it takes out a lot of the guess work. Be warned that I have looked at it but never used it so I can not comment on how well it works.
Good luck.