Skip to content

Instantly share code, notes, and snippets.

@redtower
Created January 13, 2011 15:03
Show Gist options
  • Save redtower/777989 to your computer and use it in GitHub Desktop.
Save redtower/777989 to your computer and use it in GitHub Desktop.
パスワードを入力する
sub input_password() {
my $pass;
while (!$pass) {
print "Password --> ";
system "stty -echo";
chomp($pass = <STDIN>);
print "\n";
system "stty echo";
}
return $pass;
}
my $password = input_password();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment