Gossamer Forum
Home : General : Perl Programming :

get an error in a line i never edited...

Quote Reply
get an error in a line i never edited...
Error: <<
Error including libraries: syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 600, near "<td width="120" bgcolor="#000000" valign="top"> </td"
syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 607, near ""60" bgcolor"
syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 643, near "margin"><table width=""
>>

here are the lines of code:
line 600: <td width="120" bgcolor="#000000" valign="top"> </td>
line 607: <td width="60" bgcolor="#000000"> </td>
line 643: $output = qq~<div class="margin"><table width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top">\n~;

well line 643 i never edited! and the others looks like clean html to me... so maybe there is a conflict with the perl...

help please!

thanks rik
Quote Reply
Re: get an error in a line i never edited... In reply to
It has to do with the bgcolor="#000000". Try dropping the # or escaping it with \ - i.e., bgcolor="\#000000".

Dan Smile

Quote Reply
Re: get an error in a line i never edited... In reply to
now i get this error:

Error including libraries: syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 600, near "<td width="120" bgcolor="\#000000" valign="top"> </td"
syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 607, near ""60" bgcolor"
syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 643, near "$output = qq~<div class=""
syntax error at /home/shorebre/public_html/links/panel/site_html.pl line 643, near "margin"><table width=""
Quote Reply
Re: get an error in a line i never edited... In reply to
Sounds to me like you might have edited the file that had line-wrapping on and it hosed the variable causeing a chain reaction of errors on down the page. See if you can check your code around line 643 and verify that it is all together with no line breaks.
If this isn't the case then some line above this has been 'edited' into a syntax error that had the trickle-down effect on your code. Error-catchers aren't perfect in any language Smile
Hope this helps


------------------
$blah='82:84:70:77';
print chr($_) foreach (split/:/,$blah);
Quote Reply
Re: get an error in a line i never edited... In reply to
hmm still the same error...
well dunno what to do...
Quote Reply
Re: get an error in a line i never edited... In reply to
# would never give you an error using qq~

can you post that whole sub.. usually people have errors with the ~.. and i think you probably have one to many starts or finishes..

jerry
Quote Reply
Re: get an error in a line i never edited... In reply to
well here is L.643
it's only one single line..

sub site_html_print_cat {

my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
my ($half) = int (($#subcat+2) / 2);

# Print Header.
$output = qq~<div class="margin"><table width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top">\n~;

foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];



the L.600 and L.607 looks like this...

sub site_html_category {

my ($output);
$output = qq~


<td width="460" valign="top">
<p>$site_menu</p>
<p><!--links -->$category_name_escaped<br>
<br>~;
if ($header) { $output .= qq~</p><h2>$header</h2>~; }
if ($category) { $output .= qq~<h2>Categories:</h2><br>$category ~; }
if ($links) {$output .= qq~ <br><h2>Links:</h2><br>$links ~; }
if ($related) { $output .= qq~ <h2>Related Categories:</h2><br><ul>$related </ul>~; }
if ($prev or $next) { $output .= qq~ <p>~; }
if ($prev) { $output .= qq~<strong><a href="$prev">Prev $build_links_per_page</a></strong>~; }
if ($next) { $output .= qq~<strong><a href="$next">Next $build_links_per_page</a></strong> ~; }
if ($prev or $next) { $output .= qq~</p>~; }
if ($footer) { $output .= qq~ <p>$footer</p>~; } </td>
</tr>


~;

return $output;
}

[This message has been edited by rik (edited October 24, 1999).]