in reply to DBI and Constant
Hrm. I think you'll have to use string concatenation:
use constant DBNAME => "database_test"; ... my $dbh = DBI->connect('DBI:mysql:database=' . DBNAME, 'username', 'pa +ssword') or die "$0: can't connect to DB: " . DBI->errstr . "\n";
The optimizer is probably smart enough to do the concatenation at compile time since it's smart enough to do the function inlining...
bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.
|
|---|