I will assume you mean to access said database thru a Perl script. This can be done very easily with the Perl DBI module and the Perl DBD drivers corresponding to the type of database you are connecting to. I could go into it here but you should really get the book
Programming the Perl DBI from
Oreilly Assoc..
-kel