the_slycer has asked for the wisdom of the Perl Monks concerning the following question:
Then I build the query so far like:$parms{"Login Name+"}="AUSER"; $parms{"Submitted By"}=""; $parms{"Summary"}="test test";
Which results in a string like 'Login Name+' = "AUSER" (assuming only Login Name element defined). I would need to join any given number of defined elements, based on 15 or so possible keys. Resulting in a string like (based on example above) 'Login Name+' = "AUSER" AND 'Summary' = "test test"my $query; foreach (keys %parms){ $query .= "'$_ '" . " = " . '"' . $parms{$_} '"' . " if $parms{$_} +; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ar0n) Re: Joining, but skipping the last element
by ar0n (Priest) on Jun 29, 2001 at 19:22 UTC | |
by the_slycer (Chaplain) on Jun 29, 2001 at 19:26 UTC | |
|
Re: Joining, but skipping the last element (boo)
by boo_radley (Parson) on Jun 29, 2001 at 19:37 UTC | |
|
Re: Joining, but skipping the last element
by davorg (Chancellor) on Jun 29, 2001 at 19:26 UTC | |
|
Re: Joining, but skipping the last element
by bikeNomad (Priest) on Jun 29, 2001 at 19:27 UTC |