develooper Front page | perl.beginners | Postings from August 2009

better readline?

Thread Next
From:
Bryan R Harris
Date:
August 3, 2009 15:43
Subject:
better readline?
Message ID:
C69CD224.35198%Bryan_R_Harris@raytheon.com


I'm writing a little script where the user enters some data via keyboard.

The script in some cases can guess what the user will want to enter, but I'd
like the user to be able to override what the computer has guessed.

For example, the computer thinks the user will enter "8/2 Updated database",
but the user may want to enter "8/2 Removed links table".

Is there a way to have perl prompt the user thusly:

  Enter a date and note:  8/2 Updated database<cursor goes here>

... but then the user could backspace all the way back to 8/2 and change it
if they want?  Almost like I'm pushing something into <STDIN>, which will
then get read back out?

I'm not even sure what words to use to ask, but I hope that's clear enough??

Thanks!

- Bryan



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About