in reply to DBI->connect fails when password variable used
I think it's possible to set a password in a .cnf file: see option-files.
(of course, access to .cnf files should be restricted).