Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Missing right curly or square bracket (but that isnt the case)

Reply
Thread Tools

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

 
 
daveyand
Guest
Posts: n/a
 
      05-24-2006
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';">$provi der_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

 
Reply With Quote
 
 
 
 
Mumia W.
Guest
Posts: n/a
 
      05-24-2006
daveyand wrote:
> 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.


 
Reply With Quote
 
 
 
 
Mintcake
Guest
Posts: n/a
 
      05-24-2006

daveyand wrote:
> 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';">$provi der_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

 
Reply With Quote
 
Mirco Wahab
Guest
Posts: n/a
 
      05-24-2006
Hi daveyand

> print FH <<EOHTML;


this is identical (iirc) to

print FH <<"EOHTML";

so consider

print FH <<'EOHTML';

instead. Yo have a lot of
expressions in your text,
that would be evaluated
if you use the "..." thing.

Regards

Mirco

see also: http://www.techtricks.com/webstuff/perl/heretrap.php
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      05-24-2006
daveyand <(E-Mail Removed)> wrote:

> 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.


--
Tad McClellan SGML consulting
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Escape curly bracket together to a variable extension Joan Miller Python 2 03-06-2010 06:41 PM
scanf right square bracket prodziedzic@gmail.com C++ 1 05-04-2007 12:47 PM
XMLHTTP: translating entities like curly quotes and curly apostrophes? Ken Fine ASP General 2 02-24-2004 11:17 AM
If it isnt SLR, it isnt photography, but picture taking! Steven C \(Doktersteve\) Digital Photography 33 01-15-2004 01:33 AM
...curly problem for a curly guru philpot Computer Support 5 11-29-2003 12:02 PM



Advertisments