#!usr/bin/perl -w use DBI; use strict; my $data_source = "xxxxx"; my $user = "track"; my $password = "none"; #conect #my $dup; my $dbh = DBI->connect ($data_source, $user, $password) or die "Can't connect to $data_source: $DBI::errstr"; my $sth = $dbh->prepare("select MFR_CODE from ED_PART_TRACKING where PART_NUMBER=?") or die "can't prepare statement: $DBI::errstr"; open( FILE, "<", "mahi.txt") or die "Unable to open $.t file"; while() { my $kk = $_; chomp($kk); print "$kk\n"; $sth ->execute($kk) or die "Couldn't execute statement: " . $sth->errstr; my ($dup) = $sth->fetchrow_array(); print "$dup"; if($dup eq $kk) { print"persent"; } } exit;