in reply to Calculating percent cpu in linux?

Withdrew my comment after I saw you did not want to use PS (of course, you wouldn't use it in backticks if you wanted the output, you would use something like:

open(PS,"ps|"); while (my $thisLine = <PS>){ #do something }
Kind of thing.