http://qs1969.pair.com?node_id=590211

Andrew_Levenson has asked for the wisdom of the Perl Monks concerning the following question:

Would there be a way to edit STDIN _BEFORE_ it is displayed on the screen?

SMayper and I are going to design, for fun, a file system with user logins, but we don't want the password to actually show on the screen when they type it to log in.
One of our competition questions requests that we display input using asterisks, so we know that it can't be something too difficult and obscure if we're asked to do it in competition (where most of the questions have us counting certain character -- thank you, perl. If only they knew...).

Thanks in advanced!
C(qw/74 97 104 112/);sub C{while(@_){$c**=$C;print (map{chr($C!=$c?shift:pop)}$_),$C+=@_%2!=1?1:0}}