use warnings;
use strict;
use Fcntl;
use IO::Handle;
my $PORT = 'COM8';
sysopen(USB, $PORT, O_WRONLY | O_APPEND) or die "ERROR: $!\n";
USB->autoflush(1);
print USB "hello world\n";
print USB "\x1BJ";
print USB "\x96";
print USB "\x1Bi\n";
close(USB);
####
LPRINT "hello world"; CHR$(&HA);
LPRINT CHR$(&H1B);"J";
LPRINT CHR$(150);
LPRINT CHR$(&H1B);"i";
####
\x1B is treated as 1 character
150 is treated as 3 DEC characters
BASIC CHR$(150) is treated as 1 DEC character