in reply to Getting all the databases of a PostGreSQL database server.

Where do you think does the following line get the information to which database server to connect?

my @databases = DBI->data_sources('Pg');

The DBI documentation tells you what to do in that case.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.