in reply to HTTP Daemonology
Here at work I've used Proc::ProcessTable to make a program that is similar to what you want, except ours looks for processes that have been running at high CPU usage for more than an hour with regular priority. It should be able to do what you want without a problem. It's at CPAN of course.