This is DBI/Placeholder question. I'm throwing two files into hash arrays
and comparing their content for matches on one(comma seperated)field. If I
find a match I need to fulfill one more condition before I throw the
results back to a table :
my $sth1 = $dbh1->prepare("INSERT INTO DIFFAMNTS VALUES (?,?)")
.....
.....
while (<FILE1>){
chomp;
$file2count++;
($type,$cheque,$amount,$remark) = split(/,/);
if ($cheques{$cheque}){ #If cheque already in FILE2 do necessary
$duplicates++;
if ((($amounts{$cheque}) - $amount) != 0) {
$sth1->execute(split/,/)
}
} else {
$count++;
print DIFFS2 "$_\n"; # JDE File Format
}
}
close (FILE1);
However the $sth1->execute(split/,/) is giving me all the fields from the
original file (when I only want 2) and I get the following error :
execute called with 8 bind variables when 2 are needed at
./matchingcheques3.pl line 123,<FILE1> chunk 7.
_____________________________________________
Mark Martin
Computer Centre
National University of Ireland Maynooth
Tel: (01)708 4716/3830
Fax: (01)628 6249