password.pm
branchfoerste-cms-merge
changeset 73 e3d571c7734d
parent 48 36aca6fb0ab8
equal deleted inserted replaced
36:59c7146ec6f0 73:e3d571c7734d
     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 }