6 my $dbh = DBI->connect('DBI:mysql:database=reports;host=batgirl.gsu.edu','miker','poopie');
10 DROP TABLE legacy_bill;
11 CREATE TABLE legacy_email (user_key int, email text);
12 COPY legacy_email (user_key, email) FROM STDIN;
15 warn "going for the data...";
17 my $sth = $dbh->prepare('select USER_KEY, EMAIL from USER');
20 warn "got it, writing file...";
22 while (my $cn = $sth->fetchrow_hashref) {
23 my @data = map { $$cn{uc($_)} } qw/user_key email/;
24 print join("\t", @data) . "\n";