programming-examples/perl/Database/Listing Valid DSNs.pl

15 lines
276 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use strict;
use DBI;
my @drivers;
@drivers = DBI->available_drivers;
foreach my $driver (@drivers) {
print "$driver driver is available\n";
my @dsns = DBI->data_sources($driver);
foreach my $dsn (@dsns) {
print "\tDSN: $dsn\n";
}
}