Date: Thu, 24 Jun 1999 12:50:42 +0200 From: Ladavac Marino <mladavac@metropolitan.at> To: "'Jason L. Schwab'" <jschwab@telebot.net>, freebsd-questions@freebsd.org Subject: RE: stty question Message-ID: <55586E7391ACD211B9730000C1100276179698@r-lmh-wi-100.corpnet.at>
next in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: Jason L. Schwab [SMTP:jschwab@telebot.net] > Sent: Thursday, June 24, 1999 7:08 AM > To: freebsd-questions@freebsd.org > Subject: stty question > > People, > > I am writing a perl5 script to ask for a password and I need to > have > everything the user > types in the for the password be echo'd back as *'s and not what the > type. Evidently perl doesn't come with such a feature, there I was > told > to use stty to change how the input is > handeled. I read the stty manpage, I found nothing on changing it, can > some one please help? [ML] You will have to turn off the input buffering in Perl. You will have to set the tty to raw (otherwise it is line buffered, and characters are sent to the application only after the enter has been pressed), possibly noecho as well (cannot test it, raw should do, but with this NT doorstop in front of me, I cannot verify that). Just remember to set the original values back after you are done. You can get the orig. values with stty -a /Marino > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55586E7391ACD211B9730000C1100276179698>