use strict; use warnings; use Test::More ; if ( -t STDIN ) { plan tests => 7; } else { plan skip_all => "Need a terminal to test"; } use Term::ReadKey; use Fcntl; $| = 1; if ( not exists $ENV{COLUMNS} ){ $ENV{COLUMNS} = 80; $ENV{LINES} = 24; } SKIP: { eval { if ( $^O =~ /Win32/i ){ sysopen( IN, 'CONIN$', O_RDWR ) or die "Unable to open console input:$!"; sysopen( OUT, 'CONOUT$', O_RDWR ) or die "Unable to open console output:$!"; } else{ if ( open( IN, "