news <[EMAIL PROTECTED]> wrote on 04/24/2008 08:54:46 PM:

> I would like to prompt for a password from a perl script.  I have
> tried using Term::ReadKey to turn off echo, but that doesn't seem to
> be working.  Is there a VMS specific way to do this?

There is a VMS specific way to do this.  In the discussion of
the crypt builtin function in perlfunc.pod there is this example:

    system "stty -echo";
    print "Password: ";
    chomp($word = <STDIN>);
    print "\n";
    system "stty echo";

in order to have that work on VMS replace the stty command
with the set terminal command like so:

    system "set terminal/noecho";
    print "Password: ";
    chomp($word = <STDIN>);
    print "\n";
    system "set terminal/echo";

then $word will contain what the user typed in at the prompt.

HTH

Peter Prymmer

Reply via email to