in reply to Keyboard Lights

The C code would be something like:
#include <dos.h> void main(void) { int num,caps,scroll; num=64; caps=32; scroll=16; pokeb(0x40,0x17,peekb(0x40,0x17)|num|caps|scroll); }
That's my very very first time touching C(After "Hello World",I bet it's well seen, sorry), but it should work. You could try using Inline.pm to embed it in the Perl code... Also the |s don't have to be |s, they might be ^s or &s for other effects.