As said by others, your quest is kinda dubious.
My first warning/quest after reading the OP is: "Do you really mean to match coln1 against a literal '?'?
If you want to match against a parameter in the execute that will not DWIM at all.
my %sth = map { $_ => $dbh->prepare ("select * from foo where $_ = ?") + } qw( coln1 coln2 coln3 ); # Note the unquoted ? $sth{coln1}->execute ($coln1_val); # query for coln1 executed with ? r +eplaced with $coln2_val
In reply to Re: PERL DBI MODULE
by Tux
in thread PERL DBI MODULE
by PiyaPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |