From owner-freebsd-questions Thu Jun 24 3:53:51 1999 Delivered-To: freebsd-questions@freebsd.org Received: from titan.metropolitan.at (mail.metropolitan.at [195.212.98.131]) by hub.freebsd.org (Postfix) with ESMTP id 2465A14E3A for ; Thu, 24 Jun 1999 03:53:34 -0700 (PDT) (envelope-from mladavac@metropolitan.at) Received: by TITAN with Internet Mail Service (5.0.1458.49) id ; Thu, 24 Jun 1999 12:56:28 +0200 Message-ID: <55586E7391ACD211B9730000C1100276179698@r-lmh-wi-100.corpnet.at> From: Ladavac Marino To: "'Jason L. Schwab'" , freebsd-questions@freebsd.org Subject: RE: stty question Date: Thu, 24 Jun 1999 12:50:42 +0200 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > -----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