$rowcolor=0xCCCCCC; foreach $row (@database_rows) { # print ""; $bgtext= sprintf("%x",$rowcolor); $rowcolor=$rowcolor ^ 0x333333; @fields = split (/\|/, $row); # Of course, we will only actually display fields which we # have defined as displayable in @db_index_for_display and # we will be careful to convert all pipe symbols and new # lines from our db representation values into their # original forms. # foreach $index (@db_index_for_display) # { # $fields[$index] =~ s/~p~/\|/g; # $fields[$index] =~ s/~nl~/\n/g; # Also, we will check to see if the current field being # displayed happens to be an email field. If so, we will # make it a clickable mailto link. # # Notice that you would use the exact same method for # making a clickable URL. # if ($index == $index_for_email) # { # print "$fields[4]\n" # } # else # { # print "$fields[$index]\n"; # } # # } # End of foreach $index (@db_index_for_display) # print ""; # } # print ""; print " \;
$fields[1]
\n
$fields[2]
\n  \;
$fields[3]
 \;\n
$fields[4]
 \;\n
$fields[5]
 \;\n
$fields[6]
 \;\n
$fields[7]
"; # } } }