unless (open(INPUT, "$inputfile")) { print "ERROR: Can't open file for reading : $!\n"; } #### open INPUT, $inputfile or die "Can't open $inputfile for reading: $!"; #### my @data = split("\t", $_); # assigning varables my $did1 = $data[0]; my $did2 = $data[1]; my $score1 = $data[2]; my $score2 = $data[3]; #### my ( $did1, $did2, $score1, $score2 ) = split "\t"; #### my $sth1 = $dbh->prepare("select d_id, c_id from d where d_id = '$did1';"); $sth1->execute(); my $sth2 = $dbh->prepare("select d_id, c_id from d where d_id = '$did2';"); $sth2->execute(); #### my $sth1 = $dbh->prepare("select d_id, c_id from d where d_id = ?"); $sth1->execute( $did1 ); my $sth2 = $dbh->prepare("select d_id, c_id from d where d_id = ?"); $sth2->execute( $did2 );