You seem to be having problems both with reading the error message and with basic Perl syntax.
- Single quotes don't interpolate; you would want to use "$foo" instead.
- However even changing the single quotes wouldn't fix your problem since connect wants three distinct arguments, not one.
- The format of your DSN doesn't match what DBI expects as the error message says; you need to read the documentation for the DBD driver for your particular database and find out what format it should take.
The cake is a lie.
The cake is a lie.
The cake is a lie.