logo       

Emacs like line editing during perl input.: msg#00939

emacs.help

Subject: Emacs like line editing during perl input.

I'm sneaking in a perl question that is only slightly related to
emacs.

I'd like to have somekind of line editing available during user
input to a perl script.

By default it seems none is available. Any attempt to navigate or
edit an input line produces control chars. Only backspace works to
edit.

Test:
perl -e 'while(<>){print}'

Try to edit an input line

How can I get behavior like is available in any of the true korn
shells (not pdksh).

ksh93 <RET>
read

Any input lines are editable with full vi like line editing.
if -o emacs is set then full emacs line editing is available.
How can I get similar line editing ability duing perl input?

I think Term::ReadLine is the tool for this but couldn't figure out
how to deploy it.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise