Sample using DBD::mysql
#!/usr/bin/perl -w
use strict;
use DBI();
my $database = "";
my $hostname = "";
my $port = 3306;
my $user = '';
my $password = '';

my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
my $dbh = DBI->connect($dsn, $user, $password);

my $sth = $dbh->prepare("SELECT distinct(domain) as domain FROM customerDomain");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
    print $ref->{'domain'},"\n";
}
$sth->finish();
page_revision: 0, last_edited: 1222730128|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License