sub get_enums { my ($field, $table) = @_; my $dbh = get_ka_dbh(); my $sql = qq/SHOW COLUMNS FROM $table LIKE "$field"/; my $sth = $dbh->prepare($sql) or die $!; $sth->execute(); my $ref = $sth->fetchrow_arrayref(); my ($f) = $ref -> [1] =~ /enum\('(.*)'\)/ ; return split "','", $f; }