in reply to Pushing keystrokes to a DirectX game from perl...
Win32::GuiTest can send keystrokes to apps on windows. It should do the trick.
No using Perl to cheat at video games though, the Artistic License specifically forbids that ;-).