in reply to Appending keystroke values to a flat file

I am almost certain this is not what you want, but it is all I am going to give you. Building stealth keyloggers is not in my list of useful tasks.

use Term::ReadKey; while (defined ($key = ReadKey(0)) ) { open F, '>>./keys.dat' or die $!; print F $key; close F; }