in reply to Starting a script according to processes

and if I reduce the sleep parameter to less then 1 second the CPU usage jumps to the sky.

sleep expects a whole number of seconds. Anything less than 1 gets truncated to zero ...unless you use sleep from Time::HiRes. This is documented.

For delays of finer granularity than one second, the Time::HiRes module provides usleep().