#------------------------------------------------------- # Clear User Table Then Add New Data From Delimited File #------------------------------------------------------- sub UpdateUserTable { my $dbh = shift; my ($sth, $stmt); 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 INFILE '/home/jalamior/public_html/httpsdocs/securefiles/accesscontrol.txt' INTO TABLE users FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'"; $sth = $dbh->prepare ($stmt); $sth->execute () or die "Unable to execute query: " . $sth->errstr; }