SPUG: Perl stdin backspace

Thane Williams thanew at gmail.com
Thu Aug 10 21:50:44 PDT 2006


Thanks for the replies, everyone. JD suggested a simple solution that seems
to work very well. See below.



On 8/10/06, JD Brennan <jazzdev at gmail.com> wrote:
>
> Try
>
> system("stty erase ^H");
>
> Not sure if that'll work.  You may need to run the stty
> command before running your Perl script.  xterm
> defaults to sending ^H for the Backspace key, but
> the Linux terminal driver defaults to wanting ^? (Delete)
> for the erase character.  Do "stty -all" and see what
> the erase character is set to.
>
> JD
>
> On 8/10/06, Thane Williams <thanew at gmail.com> wrote:
> > Hi there. Whenever I write a perl script in the Linux environment, if
> the
> > user tries to backspace while entering standard input, it seems like
> none of
> > the backspace keys work. Delete, backspace, and ctrl-H all fail. I've
> tried
> > googling for a solution to this, but I'm at a loss. Can anyone tell me
> how
> > to arrange things so that users can backspace while Perl's taking
> standard
> > input?
> >
> >
> > Thank you,
> > Thane
> >
> >
> > _____________________________________________________________
> > Seattle Perl Users Group Mailing List
> >      POST TO: spug-list at pm.org
> > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
> >     MEETINGS: 3rd Tuesdays
> >     WEB PAGE: http://seattleperl.org/
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/spug-list/attachments/20060810/321680f2/attachment.html 


More information about the spug-list mailing list