Playing with PerlCE
(R. Keuchel, V. Konovalov
) I had found ANSI terminal capabilities in Perl's console. Not all commands are supported
(f.e. color change are not supported
), but the basic ones
(cursor movement and clear screen
) fortunately yes. Tiny example is better:
&cls;
print &at(6, 25), "Hello world!";
<STDIN>;
# --------------------------------------------
# cursor position at (row, column)
sub at {
my ($row, $col) = @_;
return ("\e[" . $row . ';' . $col . 'H');
}
# --------------------------------------------
# clear screen
sub cls {
print "\e[2J";
}