in reply to Character Encoding of Keyboard Input

This depends on the locale. On modern linux systems, it would often be something like en_US.UTF-8, and the terminal emulator would be xterm -u8 or one of the fancy GNOME / KDE terms which also support unicode. What does

env | grep LANG

say?

Note, BTW, that as far as perl is concerned, this only incidentally has to do with *keyboard* input, since myprogram is getting its data in @ARGV.