#!/usr/bin/perl5 use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $cgi = new CGI; use strict; my @scott = $cgi->param('scott'); print "Content-type: text/html\n\n"; my %PL; dbmopen(%PL, "pricelist", 0777) || die "Can't open pricelist DBM: $!"; foreach my $scott (@scott) { if ($scott ne "") { if (defined $PL{$scott}) { my @split = split(/\|/, $PL{$scott}); for(@split) { my ($description,$price) = split/,/; print "Scott: $scott\t$description\t$price\n"; } } else { print "Scott number $scott not found\n"; } } } dbmclose(%PL);