in reply to DBI->connect fails when password variable used

Are you using  $dsn = 'dsn';?