B
Bob Smith
Using perl 5.8.7 and DBI 1.53 on a Linux system, the following
function outputs a spurious "1" to the web server's error file on the
DBI->connect line:
sub DBConnect
{
my ($DataBase) = @_;
my $DSN_SFS = "DBI:mysql:$DataBase"; # Data Source Name
my $DSN_USER = "root"; # ... (user name)
my $DSN_PWD = "secret"; # ... (password)
my %attr = (PrintError => 0, ## Don't report errors via warn ()
RaiseError => 0 ## Don't report errors via die ()
);
$dbh = DBI->connect ($DSN_SFS, $DSN_USER, $DSN_PWD, \%attr) or die
print "Can't open database <$DSN_SFS>"
. "<br />$DBI::errstr";
return $dbh;
}
Otherwise, the function works just fine. Any ideas on what could be
triggering the spurious output?
function outputs a spurious "1" to the web server's error file on the
DBI->connect line:
sub DBConnect
{
my ($DataBase) = @_;
my $DSN_SFS = "DBI:mysql:$DataBase"; # Data Source Name
my $DSN_USER = "root"; # ... (user name)
my $DSN_PWD = "secret"; # ... (password)
my %attr = (PrintError => 0, ## Don't report errors via warn ()
RaiseError => 0 ## Don't report errors via die ()
);
$dbh = DBI->connect ($DSN_SFS, $DSN_USER, $DSN_PWD, \%attr) or die
print "Can't open database <$DSN_SFS>"
. "<br />$DBI::errstr";
return $dbh;
}
Otherwise, the function works just fine. Any ideas on what could be
triggering the spurious output?