more useful options | |
PerlMonks |
Re: Super Duper Inefficientby particle (Vicar) |
on Jun 20, 2003 at 13:13 UTC ( [id://267556]=note: print w/replies, xml ) | Need Help?? |
here's a clue:
this is the inefficiency. invert these loops to make this something like:
then you'll iterate over the data once, writing to multiple files depending on the $hostid variable. after each data record is processed, it moves on to the next line without evaluating any other servers in the list. if you haven't already, you might consider using warnings or -w. you might also consider using strict. it would take some work with this code, but it makes perl debugging so much easier. ~Particle *accelerates*
In Section
Seekers of Perl Wisdom
|
|