That's the one - not my proudest moment :). Yep - I put up no code in the beginning, asked "why is this statement not working", and expected the PM to help me. Give me a break, I was frustrated all to hell and had had absolutely no progress for a few hours. And bear in mind I didn't claim that the error was in someone else' code until I was absolutely sure it was.
I didn't follow up (post code where the error is repeatable) because A) Someone had already reported the problem, and B) I had already solved my problem thanks to another poster's solution.
Would the WTF database have helped me find this? I don't know - the only search terms I had available were "perl" and "database", which I'd expect would produce quite a long list of suggestions. But I'd hope that one of the first things I'd see is "try using trace()", which was the suggestion that ultimately led me to finding the bug.
PS. If the code is, in fact, as horrible as you say it is, I'd like to know what I can do to improve it (and by association, my whole programming style). Feel free to do it in a private message to avoid crowding this node (unless you want to maintain your Anonymous status, which is fair enough