use strict; use warnings; use Win32::OLE; use Data::Dumper; # use Term::ReadKey my $HAVE_Term_ReadKey = eval { require Term::ReadKey; Term::ReadKey->import; 1 }; ## specify EFT connection information. If the eftadmin password changes, it needs to be changed here as well. our $domain='OurDomain\\'; our $pass; our $user; CONNECTION: { print "Account ID? "; chomp (my $s_id=); $user=$domain . $s_id; print " Using $user to authenticate.\n"; print "Password? "; if ($HAVE_Term_ReadKey) { ReadMode(2) } chomp (my $pass=); if ($HAVE_Term_ReadKey) { ReadMode(0) } print "\n Password: $pass\n"; print " CONNECTING TO APP ...\n"; print " CONNECTED TO APP ...\n"; $pass = undef; print "Password: $pass\n" }