my $cont_id = param("id"); my $rc_name = param("name"); my $rc_value = param("the_value"); my (@custrc,@mos,@objs);                        # declare GLOBAL vars print "Content-type: text/html\n\n"; ### SQL queries ###### # connect to database my $dbh = DBI->connect ($dsn, $user_name, $password, { RaiseError => 1, LongReadLen => 4096 }); if($cont_id eq ""){ my $sth = $dbh->prepare ("SELECT the_value FROM contacts_customs " ); $sth->execute ();   my $out = $sth->fetchall_arrayref;   @custrc = @$out;   $sth->finish;   $dbh->disconnect; } print "SANTA"; print "<html><head><title>BESCHREIBUNG - SANTA<\/title><\/head>"; print "<link rel=stylesheet type=\"text/css\" href=/styles_ratecard.css><\/head>"; print "<body topmargin=15 leftmargin=12>"; ## Process query output ### # show the overview of available description, if none has been selected yet if($cont_id eq ""){initial_list()} sub initial_list {   # this function creates the initial Description of custom   # the user may then select a company and reexecute the script for more details   my %hash;   foreach my $line (@custrc){   $hash{$line->[0]}=$line->[1];   }   print "<table border=0><tr><td id=t2>Beschreibung<br><br></td></tr>";   foreach my $key (keys(%hash)){      my $value = $key;      $value =~ s/\s/%20/g;     print "<tr><td><a href=/cgi-bin/admin/kundenvalue.cgi?name=$hash{$key}&value=$value>$key</a></td></tr>";   }   print "</table></body></html>";  exit; }