Hello all. I am trying to use bind_param to create a list of values in the form of an array. Then I want to query the data base using a basic sql statement where each value in my list (array) will be sent to the DBI in order to return a value. I am getting and error that says can't call method "bind_param" on defined value at line *&&. Here in the subroutine that will attempt to do this. sub kill_porq{ my @banlist=qw( 222497190 291529832 285471249 280768305 276573798 278628710 297888281 297002394 271831939 127465 245710698 314086723 347803890 253926979 226200204 250702348 246597179 301791980 332270292 344909948 283580543 325838931 349835609 248436566 240499101 245185000 353432496 246334241 279430907 222800122 ); my $ban=''; foreach $ban (@banlist){ $sth->bind_param (1, "$ban");
$sth=$dbh->prepare("select request_no, ban, request_sts, status_act, NPAC_Process_ind, external_req_no from vstappo.port_request where ban = ? "); $sth->execute(); return; }