Wow, I figured this problem was so odd that I wouldn't get any responses, especially that quickly. Thanks
The Active State PDK, WxPerl and Win32::GUI sound interesting. I took at look at the Win32::GUI documentation, but found
an article that says it wouldn't solve the flashing window problem, since the window gets displayed before the script has a chance to hide it. It looks like wperl, which I hadn't heard of before, but already exists in my distribution, is the simplest solution to my problem.
What I'll attempt is to run the two-hour task using wperl.exe instead of perl.exe, and then if the task needs to interact with me, it will "re-run itself" using perl.exe.