Missing right curly or square bracket (but that isnt the case)

D

daveyand

Hey guys,

I get the following error:
Missing right curly or square bracket etc......

However on doing a count i have the right number of closing to openning
brackets be it ( or [ or {.

I am however also getting about 150+ errors and it starts from after
the following bit of code.

print FH <<EOHTML;
<ul>
<li onclick="show_tree('p', $n);" class="$class"
onmouseover="this.style.background='#B8E9FF';"
onmouseout="this.style.background='white';">$provider_name</li>
<table class="hidden" id="p$n" cellpadding="0px"
cellspacing="0px">
<tr class="irrel">
<td>
<ul class="no-list-style">
<li>
Total Articles:
$provider_article_count
</li>
<li class="irrel">
Jake Link: <a href="$jake_link"
target='_blank'>View $provider_name Jake Page</a>
</li>
<li class="irrel">
Provider Id: $provider_id
</li>
EOHTML

I've had this before and have just removed the <<EOHTML and assigned it
as normal prints and it works, so it's this chunk of code. (i think
anyway) does anyone know what could be causing it, a perl nuance
maybe??

Cheers for any help

Andy
 
M

Mumia W.

daveyand said:
Hey guys,

I get the following error:
Missing right curly or square bracket etc......

However on doing a count i have the right number of closing to openning
brackets be it ( or [ or {.

I am however also getting about 150+ errors and it starts from after
the following bit of code.

print FH <<EOHTML;
[...]

The code you posted works fine, so I can only suggest that you test your
program (and the Perl interpreter?) by assigning to a variable and
printing that.

Also, there may be something wrong with the file handle FH that causes
it to not be recognized as a file handle. I ran your code by opening FH
as standard output, and it worked, but your program is no doubt more
complicated than that.
 
M

Mintcake

daveyand said:
Hey guys,

I get the following error:
Missing right curly or square bracket etc......

However on doing a count i have the right number of closing to openning
brackets be it ( or [ or {.

I am however also getting about 150+ errors and it starts from after
the following bit of code.

print FH <<EOHTML;
<ul>
<li onclick="show_tree('p', $n);" class="$class"
onmouseover="this.style.background='#B8E9FF';"
onmouseout="this.style.background='white';">$provider_name</li>
<table class="hidden" id="p$n" cellpadding="0px"
cellspacing="0px">
<tr class="irrel">
<td>
<ul class="no-list-style">
<li>
Total Articles:
$provider_article_count
</li>
<li class="irrel">
Jake Link: <a href="$jake_link"
target='_blank'>View $provider_name Jake Page</a>
</li>
<li class="irrel">
Provider Id: $provider_id
</li>
EOHTML

I've had this before and have just removed the <<EOHTML and assigned it
as normal prints and it works, so it's this chunk of code. (i think
anyway) does anyone know what could be causing it, a perl nuance
maybe??

Cheers for any help

Andy
I don't think the problem lies within this code fragment. I pasted it
into a file and got a lot of compiler warnings and a runtime error but
no compiler syntax errors
 
T

Tad McClellan

daveyand said:
I get the following error:
Missing right curly or square bracket etc......

However on doing a count i have the right number of closing to openning
brackets be it ( or [ or {.


Machines are much less likely to make a mistake than a human.

Merely counting characters is not sufficient. Those chars are
overloaded, they have more than one meaning depending on where
they are in the parse.

eg. if they are in a string, then they "don't count".

I am however also getting about 150+ errors


You most likely have one error that cascades into 150 error *messages*.

and it starts from after
the following bit of code.


No it doesn't.

It likely starts shortly before the line number reported.

does anyone know what could be causing it,


A missing right curly or square bracket.

a perl nuance
maybe??


No, if it doesn't parse, it isn't a perl program yet.

If you post a short and complete program that we can run that
produces the error message, then someone can surely help you
fix it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top