in reply to Execute in DBI fails

Execute isn't a dbh method, it's a statement method. Look a little more closely at the DBI documentation. This should work:
my $sth = $dbh->prepare($sql); $res = $sth->execute();