mattdope,
Please read
How do I post a question effectively?, did you
Super Search or look in the
Tutorials section of this site before posting? In
Tutorials there is a
Database Programming section. Did you read the
DBI documentation or the documentation for the database driver for your database (you have not indicated which database platform you are using). The documentation contains code which you can use to test database connectivity. For example if you were using MySQL:
#!/usr/bin/perl
use strict;
use DBI();
# Connect to the database.
my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost",
"joe", "joe's password",
{'RaiseError' => 1});
This is taken from the
DBD::mysql documentation.
Martin