Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: network socket send loop is very cpu intensiveby ptkdb (Monk) |
on Nov 18, 2003 at 12:51 UTC ( [id://307961]=note: print w/replies, xml ) | Need Help?? |
Looking closely, you've got your 'opendir/closedir' outside of your while(1) loop. So this loop is going to go once on the first opendir, and then 'spin' out of control as it breaks out of the inner while afterwards, but keeps trying the exhausted DH again and again and again and again. You did step through this code with a debugger before you sent it here didn't you?
In Section
Seekers of Perl Wisdom
|
|