In Win32, Screen Saver programs are not actually processes, and must have a window message loop (but not a *normal* window message loop, that would be too simple). It's not possible to use a console app as a screen saver, and it's often very hard to retrofit a regular Win32 windowing app to support the strange limitations that face screen savers.
Separately, you then lose the ability to run a user-specified screen saver.
Much more likely, you want your idle perl task to determine the "system load" in some other way, and start your work only when the system load is low for a suitable amount of time.
--
[ e d @ h a l l e y . c c ]