in reply to Re: Re: Passing data from one perl script to another.
in thread Problem constructing an SQL query with LIKE clauses
The idea is to form the wildcard string at runtime. It will look something like the following (from memory):
sub like_arg { my ($prewild, $string, $postwild) = @_; return "%" if $string eq ""; return "%" . $string . "%" if $prewild and $postwild; return "%" . $string if $prewild; return $string . "%" if $postwild; ""; }
|
|---|