Prompt for username and password


Handy for any number of things, avoiding the need to hardcode them into scripts being high on that list.

    print "login: ";
    chomp(my $user = );
    system("stty -echo");
    print "Password: ";
    chomp(my $passwd = );
    print "\n";
    system("stty echo");


source: jwe
keywords: code,perl
date: 01/20/2005