#!/usr/bin/perl -w use DBI; use CGI qw(:standard); use strict; #You connect to Oracle in a similar way I'm sure... my $driver = "mysql"; my $database = "blah"; my $hostname = "blah"; my $dsn = "DBI:$driver:database=$database;host=$hostname"; my $dbh = DBI->connect($dsn,undef,undef); print header,start_html,"\n"; my $people_query = $dbh->prepare("SELECT SS_NUMBER, FIRST_NAME, LAST_NAME FROM people"); $people_query->execute; my %people_hash; #creat a hash of "fname lname" keyed by SSN while (my @people_array = $people_query->fetchrow_array) { $people_hash{"$people_array[0]"} = "$people_array[1] $people_array[2]"; } #create a list of the SSNs maybe sort it? my @people_keys = sort{$a <=> $b} keys %people_hash; print table( Tr( td( ['Some people:', scrolling_list( -name =>'people', -values =>\@people_keys, -labels =>\%people_hash, -size=>1) ]), ), ); print end_html;