This is not a perl solution, but I've had very good sucess with using a tool from the guys at Sysinternals. Check out their
psutils. In their utility package, pslist.exe will most likely do everything you need.
Another great solution is to check out the
GNU Utilities that have been blessed with Windows ports. There's also probably, almost definitely, a ResKit utility. I know none of these solutions are perlish, but IMHO - it makes more sense to call a small executable then to have to write up an implementation of ps.