Thanks anyway Tim,

        Performance isn't really what I'm going for, just simpler code.
For the past 4 years, I've been coding to get the job done, no matter
how many lines it takes or how ugly it is to read, as long as it works
that's fine.  But recently you guys have shown me how to simplify my
code and make things infinitely easier to read.  So for the past day or
so I've been writing a script that does some log file zipping/deleting
based on last-modified time and I'm trying to do it as "neatly" as
possible.  Entire script runs in less than 30 seconds so performance
isn't much of an issue, just looking to tidy up the code.  Thanks again.

Bill 

-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 18, 2006 5:41 PM
To: Ng, Bill; [email protected]
Subject: RE: Iffor


Okay, I'm a moron.  I somehow missed that last line.  Disregard...

IMHO you probably wouldn't gain any significant performance here even if
you succeeded in the syntax you are looking for because you still have
to do a check for each iteration of the loop.  

The only thing else I can think of is if you knew the element of the
list you wanted to skip ahead of time and then iterated through the
array slice of the elements you wanted to keep.  That might save a few
cycles if the elements you throw away are towards the beginning of your
array, but for the minimal amount you gain it's probably not worth it.

This might be a good one to run by the guys at the [email protected]
mailing list.  There are some guys over there that are pretty sharp when
it comes to picking the right algorithm for a particular task.


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to