Well if you are going to want error reporting to the browser you are going to have a setup an error function and have the 'or' clause or the if(!dbh){} checking point to that. Something like this might work
sub errorHandling {
my ($error) = @{{@_}}{qw/error};
print "<html>
<head>
<title> Error </title>
</head>
<body>
You have the following error <br>
$error<br>
</body>
</html>";
}
Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)