in reply to Re: How to connect multiple databases with single sub routine connection using perl?
in thread How to connect multiple databases with single sub routine connection using perl?

Will it work.Becaue it will consider only one database and it will have the same database contents to other database also.
  • Comment on Re^2: How to connect multiple databases with single sub routine connection using perl?

Replies are listed 'Best First'.
Re^3: How to connect multiple databases with single sub routine connection using perl?
by AnomalousMonk (Archbishop) on Mar 28, 2017 at 06:59 UTC
    Will it work.

    It will not.

    my $dbh = DBI->connect($dsn, $user, $pw) || die "ERROR: can't connect to database server\n"; return $dbh; $host = "dev.sp1.wilinlog.com";

    Regardless of the name of the function, it still has the problem: nothing after the first
        return $dbh;
    statement will ever be executed. The
            $host     = "dev.sp1.wilinlog.com";
    statement will never be executed. Please see return. There are some other problems, but those will only result in warnings and so are of relatively minor importance.

    My head hurts.


    Give a man a fish:  <%-{-{-{-<