Here's a short and sweet one that will probably make me look the fool:
Apart from using backticks to run ps -ef | grep whatever and fill a data structure, is there a way to use perl/modules to grab currently running processes?
If you make something idiot-proof, eventually someone will make a better idiot. I am that better idiot.