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" } #### VinsWorldcom@C:\Users\VinsWorldcom\tmp> test Account ID? vinsworldcom Using OurDomain\vinsworldcom to authenticate. Password? Password: My_Password CONNECTING TO APP ... CONNECTED TO APP ... Use of uninitialized value $pass in concatenation (.) or string at C:\Users\VinsWorldcom\tmp\test.pl line 34, line 2. Password: VinsWorldcom@C:\Users\VinsWorldcom\tmp>