(Selective snipping) > + my $clause = ''; > + foreach my $row ( @args ) { > + $clause = "ORDER BY$clause" if $clause; Is $clause guaranteed to have whitespace at the beginning? > + if( ($self->{'order_clause'} || '') ne $clause ) { > + $self->RedoSearch(); Indentation bad. Also, IIRC, RT generally puts a space after the if. -R