data_source, user, passwd, [\%attr]
Connects to the specified database, returning a database handle object.
method automatically installs the driver
if it has not
already been installed.
A string identifying the driver to connect to, and any other
additional driver-specific information needed to identify the
driver (e.g., a port number.)
The driver name is written in the form
(Default value is taken from the
DBI_DSN environment variable.)
For example, a
connection string for the mSQL driver always starts with
The second colon should be followed by any information required by the
driver to make the database connection. In the case of mSQL, you must supply
a database name (
in the following example), a hostname
), and the port number of the database server (
The user name for the database connection. (Default value is
taken from the DBI_USER environment variable.)
The password for the database connection. (Default value is
taken from the DBI_PASS environment variable. Set this value
at your own risk.)
A hash reference defining attributes for the database handle.