in reply to backspace works in shell, but not in Perl?

You may wish to look at something like Term::ReadLine or Term::ReadLine::Gnu. It is my understanding that those modules allow you to add such functionality to your scripts as the ability to edit a line (which sounds like the limitations of which you are encountering), or even add a command history.

  • Comment on Re: backspace works in shell, but not in Perl?

Replies are listed 'Best First'.
Re: Re: backspace works in shell, but not in Perl?
by bcrowell2 (Friar) on Feb 28, 2004 at 18:10 UTC
    Thanks for the reply, but to clarify, it's not a limitation, it's a bug or a misconfiguration. Stuff like Term::ReadLine allows you to use fancy Emacs-like control characters for editing, but this is more fundamental. If I hit the '(' key, i.e., shift-9, it backspaces! I know it sounds insane, but that's what actually happens when I run a Perl app that reads from stdin. It's a new behavior on my two FreeBSD systems -- everything used to be fine until last month.