You can try Win32::GuiTest, it seems it's able to send clocks and keystrokes to windows.
Also you can use AutoHotKey or AutoIt to write a credentials-entering program, but this is not Perl.
Sorry if my advice was wrong.
Comment on Re^5: Calling an executable and entering login credentials