There is a nice article by Martin C. Brown on how to optimize perl scripts over at the IBM Developer Works site. There's a short instructive section on how to use short circuit logic in place of more computationally intensive conditional statements. If you write perl, its worth a read in case you don't already know about these tips.