my $TYPE_QUERY = qq!SELECT APPT_TYPE||'|'||INFO_NEEDED FROM SC_APPT_TYPE!; my $sth = $dbh->prepare("$TYPE_QUERY") or dienice("709 Couldn't prepare statement: " . $dbh->errstr); $sth->execute() or dienice("713 Couldn't execute statement: " . $sth->errstr); while (my @types = $sth->fetchrow_array()) { foreach my $types (@types) { chomp($types); my ($info, $type) = split "|", $types; print qq!\n!; } } #### Onsite,FULL POC,FULL Phone Walkthru,PHONE Con Call,PHONE FTO,NONE Travel Day,NONE Admin Day,NONE Local Only,NONE Holiday,NONE SC Training,TRAIN #### Appointment Type: