sub checkSQL{ my $sql=shift; my $sth = $dbh->prepare($sql) || return "SQL Syntax Error:" . $DBI::errstr; return 1; }