I have written a selection of Perl scripts for various purposes, mostly for Windows/Windows XP management:
MSI-GUID - A Script (Windows XP) which extracts the GUID from an MSI - useful since MSI's can be installed/uninstalled by reference to their GUID alone.
LOGIN-STATUS - A Script (Windows XP) which uses various WMI calls to return the list of users currently logged in, and their status (i.e if user is Interactive, length of login etc).
LAST-INPUT - Another Windows XP script which records the time interval since there was mouse/keyboard input on the computer - useful to know when the machine was last used, if you want to forcibly reboot etc.
BLOCKINPUT - A Windows (probably 9x/NT, definitely 2k/XP) that blocks physical input to the PC - i.e it locks the keyboard and mouse to prevent the user entering data (and unlocks it again!). Useful for running scripts that simulate keystrokes (to prevent user interfering) or to force a user to rest to prevent RSI - probably many other uses I haven't thought of yet... This script simply locks input, waits 15 seconds, and then unlocks it again, but the code to do so is trivial, and should be easy to understand. Relies on the BLOCKINPUT function in user32.dll, supplied with Windows XP, and the Win32::API module.
ADMan - Active-Directory Management - A Module that lets you make ADSI calls to a Windows Active Directory for the management of objects in the tree.