Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No Echo while using IO::Socket and Term::ReadKey??

0 views
Skip to first unread message

Steve Wells

unread,
Apr 4, 1999, 4:00:00 AM4/4/99
to
I'm having trouble with the following code:
------------------------------------------
use IO::Socket;
use Term::ReadKey;

my $password;
my $client;
my $server = IO::Socket::INET->new(LocalPort => '6666',
Type => SOCK_STREAM,
Reuse => 1,
Listen => 10 )
or die "Couldn't be a tcp server on $server_port";

while ($client = $server->accept()) {
ReadMode('noecho',$client);
print $client "Password: ";
chomp($password = ReadLine(0,$client));
print "PASSWORD: $password\n";
}

exit 1;
-----------------------------------------------

All I'm trying to do as you can see is create
a simple server that allows someone to enter
a password. I don't want it echoed back to the
screen on the client side and I'm trying to
use Term::ReadKey to achieve this. For some
reason the password letters are still echo'd
back. Any ideas?

Thanks in Advance,
STEVE
--
-----------
Stephen D. Wells
http://www.iren.net/wellss/

Steve Wells

unread,
Apr 5, 1999, 3:00:00 AM4/5/99
to

It seems to work as long as you are using
Windows. I'm using linux though and it still
echoes back the password as you type it in.

TIA,

0 new messages