#!/usr/bin/perl -wT use strict; use CGI qw(:standard escapeHTML); use vars qw ( way too many of them); my $query = CGI->new(); @names = $query->param; ... (preparatory material including a heredoc for the top of the page to be returned) foreach $name (@names) { @values = $query->param( $name ); for $values(@values) { if ( $values[1] =~ /^0$/ ){ last; } # Note 1 &untaint($name, $values ); # ... Test and print html-table rows, if $values[1] != 0 } } }