Hi Bill,

there are at least two ways...

1) write an own program e.g. in C using the stdandard function getch() to read
characters from an input device

2) in perl directly with the help of the module Term:ReadKey:

     use Term::ReadKey ;

     ReadMode 2 ;
     print STDERR "PASSWORD:";
     $userpass = ReadLine(0) ; chomp $userpass ; print STDERR "\n";
     ReadMode 0 ;

I used this in a program needing database access (explicit login) and printed to
STDERR to be able to redirect output.

HTH

Stefan

p.s. the module is to be found at
          http://www.activestate.com/PPMPackages/zips/6xx-builds-only/


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to