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

后端 未结 7 1005
长发绾君心
长发绾君心 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:10

    You should take a look at either Term::ReadKey or Win32::Console. You can use those modules to read the single key strokes and emit '*' or whathever.

提交回复
热议问题