print "Content-type: text/html\n\n";
my $dbh=DBI->connect('DBI:Oracle:METAD1', 'ei_arf_webform_select', 'xxxx') or die "Cannot connect to DB: " . DBI->errstr;
my $sql = "SELECT org_name FROM mv_org_structure_list WHERE ORG_TYPE='D'";
my $sth = $dbh->prepare($sql) || print "Cannot prepare";
$sth->execute || print "Cannot execute";
my @result;
my @dept;
while (@result = $sth->fetchrow_array()) {
push(@dept, @result);
}
print "";