How can I enter a password using Perl and replace the characters with '*'?

后端 未结 7 1006
长发绾君心
长发绾君心 2020-12-03 03:54

I have a Perl script that requires the user to enter a password. How can I echo only \'*\' in place of the character that the user types, as they type it?

I\'m using

7条回答
  •  不知归路
    2020-12-03 04:08

    Have you tried storing the string (so that your program can still read it) and find out its length then create a string of the same length, but only use '*'?

提交回复
热议问题