Always group reply so the list can help as well, as I definitely don't have all the answers :-) ...

I am not able to reproduce the problem, copying and pasting your script into a test here, output correct HTML, that did not display extra < characters where you indicated.

The only thing I can suggest is to do things more "programmatically", that is, let the language work for you. For instance rather than doing one big print, why not stick the categories into arrays or arrays of hashes or the like then iterate through the arrays with only one print statement. You could start with something simpler, but regardless debugging your print statements will become a bigger nightmare than it already must be.

For example:

#!/usr/bin/perl
use strict;
use warnings;

require "config.cgi";

my @mainlinks = ( {'width' => '200', 'title' => 'Auction Categories' },
{'width' => '450', 'title' => 'Featured Items' },
{'width' => '150', 'title' => 'News'} );

print "<table width=800><tr>\n";
foreach my $ml_ref (@mainlinks) {
print "<td width=$ml_ref->{'width'} bgcolor=$config{'colortablehead'} align=center>\n";
print "<b><font face=Arial size=4 color=$config{'colortext'}>$ml_ref->{'title'}</b></td>\n";
print "</td>\n";
}
print "</tr>\n";

print "<tr><td>\n";
# arrays are zero indexed, use the first element as the main category name
my %sublinks = ( 'jewelry' => ['Jewelry','Necklaces','Earrings','Pendants','Bracelets','Hair Adornments','Other'],
'toys' => ['Toys','Puzzles','Games','Dolls','Other'] );

while ( my ($category,$sc_ref) = each (%sublinks) ) {
my $main = shift @$sc_ref;
print "<p align=left>\n";
print "<a href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:$category&amp;listtype=current\">\n";
print "<font color=$config{'colortextnorm'} face=Arial size=3><b>$main</b></font></a><br>\n";
print "<font size=2 face=Arial color=$config{'categoryfont'}>\n";

my $count = 1;
foreach my $subcat (@$sc_ref) {
print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=";
print "$category$count&amp;listtype=current\">$subcat</a><br>\n";
$count++;
}

print "</p>";
}
print "</td>\n";

This is untested and rather complex, but try to work your way through it and ask questions where you get stuck. Things like sorting, etc. I leave to you, but this gives you an idea of the direction you can head. Always use strict, use warnings you will thank yourself later.

http://danconia.org


[EMAIL PROTECTED] wrote:
Okay, here's the beginning of the code. The line with the main category
jewely prints correctly. The next line, with the subcategory necklaces,
prints with the > arrow in front of it. The next lines are all correct
until we come to another main category. The main category prints
correctly again and the first subcategory has the symbol in front. This
is in a file called Index.cgi which calls up Config.cgi which has other
headers in the beginning. Thanks for any help you can give me.
lalg
#!/usr/bin/perl
require "config.cgi";




print "<table width = 800>
<tr>
<td width = 200 bgcolor=$config{'colortablehead'} align=center>
<b><font face=Arial size=4 color=$config{'colortext'}>Auction
Categories</font></b><br>
</td>
<td width = 450 bgcolor=$config{'colortablehead'} align=center>
<b><font face=Arial size=4 color=$config{'colortext'}>Featured Items</b>
</td>
<td width = 150 bgcolor=$config{'colortablehead'} align = center>
<b><font face=Arial size=4 color=$config{'colortext'}>News</b>
</td>
</tr>
<tr>
<td>";
print "<p align=left><br>
<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:jewelry
&amp;listtype=current\">
<font color=$config{'colortextnorm'} face=Arial
size=3><b>Jewelry</b></font></a><br>
<font size=2 face=Arial color=$config{'categoryfont'}>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=jewelry1
&amp;listtype=current\">Necklaces</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=jewelry2
&amp;listtype=current\">Earrings</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=jewelry3
&amp;listtype=current\">Pendants</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=jewelry4
&amp;listtype=current\">Bracelets</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=jewelry5
&amp;listtype=current\">Hair Adornments</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=jewelry6
&amp;listtype=current\">Other</a>
</font></p>
<p align=left>
<a href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:toys
&amp;listtype=current\">
<font color=$config{'colortextnorm'} face=Arial
size=3><b>Toys</b></font></a><br>
<font size=2 face=Arial color=$config{'categoryfont'}>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=toys1&am
p;listtype=current\">Puzzles</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=toys2&am
p;listtype=current\">Games</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=toys3&am
p;listtype=current\">Dolls</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=toys4&am
p;listtype=current\">Other</a>
</font></p>
<p align=left>
<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:fiberar
t &amp;listtype=current\">
<font color=$config{'colortextnorm'} face=Arial size=3><b>Fiber
Art</b></font></a><br>
<font size=2 face=Arial color=$config{'categoryfont'}>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=fiberart
1&amp;listtype=current\">Wearables</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=fiberart
2&amp;listtype=current\">Quilts</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=fiberart
3&amp;listtype=current\">Afghans</a>
</font></p>
<p align=left>
<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:collect
ibles &amp;listtype=current\">
<font color=$config{'colortextnorm'} face=Arial size=3>
<b>Collectibles</b></font></a><br>
<font size=2 face=Arial color=$config{'categoryfont'}>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=collecti
bles1&amp;listtype=current\">Miniatures</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=collecti
bles2&amp;listtype=current\">Sculpture</a>
</font><br></p>
<br>
<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:books
&amp;listtype=current\">
<font color=$config{'colortextnorm'} face=Arial size=3>
<b>Crafting Books</b></font></a><br>
<font size=2 face=Arial color=$config{'categoryfont'}>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=books1&a
mp;listtype=current\">Woodworking</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=books2&a
mp;listtype=current\">Clay, Polymer</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=books3&a
mp;listtype=current\">Clay, Earth</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=books4&a
mp;listtype=current\">Glass, Blown</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=books5&a
mp;listtype=current\">Glass, Stained</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=books5&a
mp;listtype=current\">Other</a>
</font></p>
<p align=left>
<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=:tools
&amp;listtype=current\">
<font color=$config{'colortextnorm'} face=Arial size=3>
<b>Crafting&nbsp;Tools</b></font></a><br>
<font size=2 face=Arial color=$config{'categoryfont'}>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=tools1&a
mp;listtype=current\">Woodworking</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=tools2&a
mp;listtype=current\">Clay, Polymer</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=tools3&a
mp;listtype=current\">Clay, Earth</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=tools4&a
mp;listtype=current\">Glass, Blown</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=tools5&a
mp;listtype=current\">Glass, Stained</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<a
href=\"$config{'domainurl'}/cgi-bin/auction/auction.cgi?category=tools6&a
mp;listtype=current\">Other</a>
</font>
</td>";


NOTICE: This address belongs to a Washington State resident and is
therefore protected from unsolicited commercial e-mail by RCW 19.190. Monetary penalties apply for each offense.

________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to