Skip navigation.

极湖

无不用其“极”

在Perl程序中关闭输入回显功能

, ,

在Perl程序中,若有输入密码的功能,或许你不想让输入的内容回显到屏幕上,这时候可以用stty命令让echo无效。

程序例:
#!/usr/bin/perl

system("stty -echo");
print "Enter your password: ";
chomp($passwd = <>);
print "\n(Test) Your password is $passwd\n";
system("stty echo");

Ubuntu 7.04下SCIM输入法的设置一篇关于RAID的文章

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31