in reply to How do I specify the MySQL socket file?

Have a look at: http://dev.mysql.com/doc/refman/5.0/en/problems-with-mysql-sock.html there are notes below the documentation that talk about setting the named socket in perl.
  • Comment on Re: How do I specify the MySQL socket file?