in reply to Re^2: 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.

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:  <%-{-{-{-<

  • Comment on Re^3: How to connect multiple databases with single sub routine connection using perl?
  • Select or Download Code