|
Re: Emacs like line editing during perl input.: msg#00973emacs.help
Harry Putnam <hgp@xxxxxxxxxxxxx> writes: > I'd like to have somekind of line editing available during user > input to a perl script. Here is an example program using Term::ReadLine that worked for me. #!/usr/sw/perl/default/bin/perl -w use Term::ReadLine; my $t = Term::ReadLine->new('Do nothing'); my $inp = ''; # input from user print "Type quit to quit.\n"; do { $inp = $t->readline("> "); } while ( $inp ne 'quit' ); exit 0; Don't forget to change the first line. It's really as easy as calling $x->readline($prompt) to read a line after creating the Term::ReadLine object $x. -- Ambibibentists unite! |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: setting site-wide default colors,fonts,... in Emacs: 00973, Hans Larsen |
|---|---|
| Next by Date: | Re: In *shell*, what *might* cause ^c^z and ^c^c to not work?: 00973, Kai Großjohann |
| Previous by Thread: | Re: Emacs like line editing during perl input.i: 00973, Harry Putnam |
| Next by Thread: | Re: Emacs like line editing during perl input.: 00973, Harry Putnam |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |