use v6;
use NCurses;
my $win = initscr() or die "Failed to initialize ncurses\n";
for ^10 { mvaddstr($_ , 0, (for ^10 {(41 .. 90).roll.chr}).join )};
my $icol = 3 - 1;
my $irow = 6 - 1;
my $ch = mvinch($irow,$icol);
mvaddstr($irow, $icol+10, 'Character at column 3, row 6 = ' ~ $ch.chr);
mvaddstr( LINES() - 2, 2, "Press any key to exit..." );
nc_refresh;
getch;
LEAVE {
delwin($win) if $win;
endwin;
}
Output:
+W18:5I<1N
N-I.HG45SK
BFJY8:AK)8
J+4U<H1++:
RP>BX-/19Y
URDESVX;HX Character at column 3, row 6 = D
J7+X3@E<BG
M;?2U<8+FI
)@BG,:D)O1
)>A-=LDY-.
Press any key to exit...