>>> return 1 if $one == $two or return 0; > > > Just FYI: > > I always wonder why someone would write such code. IMHO this is > unmaintainable code. I might not be an Perl expert, but I wouldn't consider > myself a beginner either, especially not at boolean logic. And still, my > mind cannot grasp what this actually does - I would need to write it down > on paper and trace it to actually understand it. And if you need to do that > than the code in question is too complicated :) > > But maybe I am just overworked and tired :)
nope, I fully agree. however, you can't always choose which legacy code you inherit. and you can't always just up and change production code. well, unless you have some tests to show that it works the same way as it did before, the reason that I'm writing tests for it ;) --Geoff