Next | Program Repair Shop | 235 |
while (<INFILE>) { ... $chain_test=1 if (/CHAIN_TEST/);
if (/apply/ && ($chain_test)) { ... } }
It's still valuable to avoid such flag variables if possible
Their state is one more thing to remember while debugging
Sometimes there is a way that is just as simple with no flag
while (<INFILE>) { last if /CHAIN_TEST/ }
while (<INFILE>) { ... if (/apply/) { ... } }
Next | Copyright © 2002 M. J. Dominus |