sub UpdateUserTable { my $dbh = shift; my ($sth, $stmt); my $infile = "../securefiles/accesscontrol.txt"; warn("Entered sub UpdateUserTable"); $stmt = "DELETE FROM users"; $sth = $dbh->prepare ($stmt); $sth->execute () or die "Unable to execute query: " . $sth->errstr; #$stmt = "LOAD DATA LOCAL INFILE '/home/jalamior/public_html/httpsdocs/securefiles/accesscontrol.txt' $stmt = "LOAD DATA LOCAL INFILE '$infile' INTO TABLE users FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'"; $sth = $dbh->prepare ($stmt); $sth->execute () or die "Unable to execute query: " . $sth->errstr; }