if (defined($allocated_to) && $allocated_to ne '') { push @where_clause, "UPPER(ALLOCATED_TO) LIKE UPPER('\%$allocated_to\%')"; push @entries, 'ALLOCATED_TO'; } if (defined($contact_person) && $contact_person ne '') { push @where_clause, "UPPER(CONTACT_PERSON) LIKE UPPER('\%$contact_person\%')"; push @entries, 'CONTACT_PERSON'; }