in reply to Re^2: Compound Sql Statement
in thread Compound Sql Statement

Check if your prepare method call fails, and if so, see what the error is:
my $loadHandle = $dbh->prepare("$sql; $nextsql; $lastsql") or die "Couldn't prepare statement: ",$dbh->errstr,"\n";