kprasanna_79 has asked for the wisdom of the Perl Monks concerning the following question:

Revered Monks,

I am new to this error, and also can any body throw some light on DBI_DSN var. Please help to get out of this error.

Can't connect to data source ARRAY(0x4001496c), no database driver spe +cified and DBI_DSN env var not set at - line 3
-Prasanna.K

Replies are listed 'Best First'.
Re: no database driver specified and DBI_DSN env var not set
by marto (Cardinal) on Oct 22, 2007 at 11:22 UTC
Re: no database driver specified and DBI_DSN env var not set
by jettero (Monsignor) on Oct 22, 2007 at 11:18 UTC

    I have a hunch you have your dbi connect string in an array and you're passing it to DBI. I have to guess because you didn't provide any code (which would definitely help).

    Note that there's a difference between $ar and @ar below.

    my @ar = (1..3); my $ar = \@ar; print "@ar | $ar \n";

    Most likely you just have to do something like DBI->connect(@$arguments) to turn your arrayref into an array.

    -Paul

Re: no database driver specified and DBI_DSN env var not set
by Anonymous Monk on Oct 24, 2007 at 08:30 UTC
    Are you new to line numbers?