I am writing a little script to maintain some log files.
In the nature of readability I have set up several if statements to make it easier for the folks that follow.
Due to the fact that it will be run without much need for efficiency, I went for readablity.
#see if it hasn't been touched in 3 days
if (-M "$logdir/$f" > 3.0)
#see if file begins with ab or def case insensitive
#see if hasn't been zipped already
system ("/usr/local/bin/gzip", "$logdi
My question would be would it be more efficient to have a larger regex that does it in one pass?