[Chicago-talk] Scalar help.

Richard Reina richard at rushlogistics.com
Mon May 7 06:08:00 PDT 2007


Good Morning,

Hope everybody had a great weekend.

I have a little program called query_aid.pl that helps users here on are land enter information more easily by matching scalar choices as they are matched.  For example if a user begins typing the name "lincoln" it will begin showing him the matches as he types and eliminating records that no longer match with each successive letter that is typed.  The program uses readkey to see if the user has typed a number.  A number means that the user is attempting to make a selection by typing in one of they corresponding numbers for a displayed record.  The program has worked great for years except for one annoying inconvenience.  It deals with adding the first number typed for the selection in the following way:

if ($char > 0) { #it's numeric, they're making a selection
    ReadMode 'normal';
    print $char;
    chomp ($choice = <STDIN>);
    $choice = $char . $choice;
}

Accordingly, if the user accidentally types the wrong first digit of the number (selection) the user cannot backspace and erase the first digit of the selection ($char) and retype it, but instead has to start over. Is there a way to make $char accessible to the user so they can backspace and erase it if they made a mistake?

Thanks for considering my quandary.

Richard


Your beliefs become your thoughts.  Your thoughts become your words.  Your words become your actions.  Your actions become your habits.  Your habits become your values.  Your values become your destiny.  -- Mahatma Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20070507/6ba19e01/attachment.html 


More information about the Chicago-talk mailing list