Active Perl console access

JJ Streicher-Bremer
Tue Mar 2 14:19:00 GMT 1999

I am trying to get this snippet of code working on my system. 
use Term::ReadKey;
use Fcntl;
#Set the FileHandles to TRUE

ReadMode 2;

print "\nEnter passwd: ";

$t = ReadLine 0;

chop $t;

print "\nYou entered $t\n";

My system is:
WinNT 4.0 SP4 
Active Perl 5.005.509
Connecting via sshd

When I try to run my code I get this error:
{jj-a@xena}~/perl/readpasswd: perl
GetConsoleMode failed, LastError=|6| at
d:\apps\perl\site\lib/Term/ line 247.

When I run it via a local bash shell, a cmd.exe shell, or a remote
Ataman Telnetd shell it works as expected.

Elsewhere in my code I need to use the Win32::AdminMisc module so a port
of perl is out (unless the Win32 modules run under cygnus perl this

Any ideas on how to pass console information from an sshd shell to perl?

Thanks in advance.

JJ Streicher-Bremer
NT Systems Administrator
Digital Island Inc.

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list