in reply to How to use a specific socket with DBI

From perldoc DBI:

Examples of $data_source values are:

    dbi:DriverName:database_name
    dbi:DriverName:database_name@hostname:port
    dbi:DriverName:database=database_name;host=hostname;port=port

I think this answers your question. (unless by "socket" you mean an already existing connection, in which case, I have no idea)