keyfile generator
[Evergreen.git] / Evergreen / src / extras / import / create-batgirl-keyfile.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use DBI;
5
6 my $dbh = DBI->connect('DBI:mysql:database=reports;host=batgirl.gsu.edu','miker','poopie');
7
8 warn "going for the data...";
9
10 my $sth = $dbh->prepare('select CAT_KEY,FLEX_KEY from CATALOG');
11 $sth->execute;
12
13 warn "got it, writing file...";
14
15 while (my $data = $sth->fetchrow_arrayref) {
16         print join('|', @$data) . "\n";
17 }
18