password.pm
branchfoerste-cms
changeset 72 66bf85163780
parent 0 2a5f2464f8c6
equal deleted inserted replaced
36:59c7146ec6f0 72:66bf85163780
     3 sub ask($) {
     3 sub ask($) {
     4     local $| = 1;
     4     local $| = 1;
     5     return undef if not -t;
     5     return undef if not -t;
     6 
     6 
     7     print $_[0];
     7     print $_[0];
     8     system(stty => "-echo");
     8     system( stty => "-echo" );
     9     my $ans = <STDIN>;
     9     my $ans = <STDIN>;
    10     system(stty => "echo");
    10     system( stty => "echo" );
    11     print "\n";
    11     print "\n";
    12 
    12 
    13     chomp $ans;
    13     chomp $ans;
    14     return $ans;
    14     return $ans;
    15 }
    15 }