It's the loop on line 271.
In reply to Re: perl threads causing high cpu usage by BrowserUk in thread perl threads causing high cpu usage by tish15