in reply to Cleanup time

If you know that $allocated_to will never contain "0" (a zero), then you can simplify the code to :

if ($allocated_to) { push @where_clause, "UPPER(ALLOCATED_TO) LIKE UPPER('%$allocated_to% +')"; push @entries, 'ALLOCATED_TO'; }

(the % don't need to be escaped in Perl strings) - possibly you might want to collapse both cases into a third subroutine like the following :

sub add_if_defined { my ($columnname,$queryvar) = @_; die "add_if_defined: First parameter (columnname) may not be empty ( +maybe you supplied columnname and queryvar in the wrong order ?)" unless $columnname; if (defined($queryvar) && $queryvar ne '') { push @where_clause,"UPPER($columname) LIKE UPPER('%$queryvar%')"; push @entries, $columnname; } };
and then call that routine like follows :
add_if_defined("ALLOCATED_TO",$allocated_to); add_if_defined("CONTACT_PERSON",$contact_person);

This might make your code more readable, but it will also hide the actual side effects in the subroutine.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web