6 my $dbh = DBI->connect('DBI:mysql:database=reports;host=batgirl.gsu.edu','miker','poopie');
10 DROP TABLE legacy_callnum;
11 CREATE TABLE legacy_callnum (call_num text, cat_key int, call_key int, shadow bool);
12 COPY legacy_callnum (call_num, cat_key, call_key, shadow) FROM STDIN;
15 warn "going for the data...";
17 my $sth = $dbh->prepare('select * from CALLNUM');
20 warn "got it, writing file...";
22 while (my $cn = $sth->fetchrow_hashref) {
23 my @data = map { $$cn{$_} } qw/CALL_NUM CAT_KEY CALL_KEY SHADOW/;
32 print join("\t", @data) . "\n";