http://qs321.pair.com?node_id=78949

scottstef has asked for the wisdom of the Perl Monks concerning the following question:

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 if ($f=~/^(ab|def)/i) { #see if hasn't been zipped already if (!($f=~/gz\b/)) { system ("/usr/local/bin/gzip", "$logdi +r/$f"); }

My question would be would it be more efficient to have a larger regex that does it in one pass?