What I neglected to say was that the $where passed in is built from a query parm and I had taint checking on. When taint checking is turned off it works, so I guess I need to untaint. I'll check doc on this.
I'd heard lots of good things about -T, but I guess I expected an error message including the word "taint" :)
Comment on Re: Variable are equal but don't behave that way