My end goal in this situation is just to be able to use arrow keys for browsing through different areas of a script. Whenever an arrow key is pressed I want it to run a new subroutine as specified.That is not your end goal - that is still a method for accomplishing it. What task does your script accomplish? Think PHB big picture. Or are you saying you are trying to build a text editor? It sounds like you are trying to create a command line interface (CLI) for existing libraries.
I am very new to perl, and it is essentially my first programming language.The language is Perl, the program is perl, just so you know. For someone with not a lot of background, you have selected a very hairy task to cut your teeth on. I would suggest sticking with the simple inputs ('q', 'w') unless there is a strong reason for changing. I have been doing this a while, and I would have pause before picking up the task you've laid out.
The entire script, with its 5 or so modules, is about 8000-9000 linesAre you modifying a script that someone else wrote? Wrapping other people's code?
I note that in your original code, you have goto. I have never used a goto in a Perl script - the more natural solution is (usually) a dispatch table.
In reply to Re^5: Regex arrow key problem
by kennethk
in thread Regex arrow key problem
by austin43
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |