$sql_cmd = SELECT count() from onegfoco_dbone.tssi_detail where key1 = '$PART5'; my $st2= $dbh-prepare($sql_cmd); $st2-execute; $RC1 = $st2-fetchrow_array(); #print np RC1 $sql_cmd ,$RC1; if ($RC1 ne '0') { # print Found $RC ; $FOUND = $F0R.b Processed; }