in reply to Strange Curses behaviour
#!/usr/bin/perl # http://perlmonks.org/?node_id=1146715 use strict; use warnings; use Curses; END{ endwin(); }; initscr; curs_set(0); clear(); noecho(); halfdelay(30); my $win1 = Curses->new( 7, 30, 5, 5); refresh(); ########################### Curses seems to need this line $win1->box(ACS_VLINE, ACS_HLINE); my $char = -1; while(1) { $win1->addstr( 2, 2, scalar(localtime)); $win1->addstr( 4, 10, "Char: $char "); $win1->refresh; if(!@ARGV) { sleep 3; } else { $char = getch(); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strange Curses behaviour
by duncs (Beadle) on Nov 03, 2015 at 09:05 UTC |