in reply to Reading a password from the user

And Term::ReadPassword seems even easier:

From the docs

use Term::ReadPassword; my $password = read_password('password: ');
-- Joost downtime n. The period during which a system is error-free and immune from user input.

Replies are listed 'Best First'.
Re: Re: Reading a password from the user
by Anonymous Monk on Apr 04, 2003 at 13:43 UTC
    Though, I've tried this before, I downloaded both the modules (Term::ReadKey, Term::ReadPassword) from CPAN...
    They dont seem to work when i run them. I'm able to 'use' it but the modules don work. I have active perl 5.8 for windows.
    ... but it seems that once you have it properly installed, its easy after that...
    Any Alternatives?...thanks!
      Downloading them is not. You have to install them.

      How do you do that?

      Well, if you prefer to do it by hand as you evidently do, you should read the README file that is part of the tarball (.tar.gz file) you downloaded from CPAN.

      First you unpack it with gunzip and tar, then:

      perl Makefile.PL make make test make install

      For the final, make install step, you need to be root.

      --
      Regards,
      Helgi Briem
      helgi AT decode DOT is

        You can also do perl -MCPAN -e "install Term::ReadPassword" and follow instructions.

        OR, on windows use PPM for installing compiled modules for ActivePerl. It should be in your ActivePerl installation.

        -- Joost downtime n. The period during which a system is error-free and immune from user input.

      For Active State's perl on Windows, there is a bundled module installer. I would recommend trying to use that to get the modules properly set up to use in AS perl.