while (my $cond = shift) { $filter = "($op $filter $cond)" if defined $cond; }