Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Perl Script Causing high CPU usage

by bulk88 (Priest)
on Sep 29, 2013 at 15:40 UTC ( #1056230=note: print w/ replies, xml ) Need Help??

in reply to Perl Script Causing high CPU usage

Do a ` with ls or dir, then parse the output. Those 2 tools will use a faster/lower overhead OS call than perl would be using. You are also touching the disk repeatedly and unnecessarily by doing -f $ObjectName and -d $ObjectName many times in the logic tree instead of doing them once and caching the result to a scalar before the logic tree.

Comment on Re: Perl Script Causing high CPU usage
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056230]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-10-04 13:28 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (102 votes), past polls