#!c:\perl\bin\perl.exe use strict; use warnings; use CGI; use DBI; #calling the service overview tables my $q= new CGI; print $q->header(); print $q->start_html(-title=>'service metrics'); print qq[
]; #code to create the scroll down box which selects from the db my $db = DBI->connect(foo, bar, baz {RaiseError => 1, AutoCommit => 1}); my $sth = $db->prepare("SELECT Name FROM service_metrics"); $sth->execute; my @data; while (my @result = $sth->fetchrow_array) { push @data,$result[0]; } print $q->scrolling_list(-name=>"metrics", -value=>"@data"); $sth->finish; $db->disconnect(); print $q->submit(-value=>"Choose"); print qq[
];