On Nov 4, 2005, at 13:58, Gary Stainburn wrote:

On Friday 04 November 2005 12:20 pm, Xavier Noria wrote:
On Nov 4, 2005, at 13:03, Gary Stainburn wrote:
Hi folks I've got the following code which generates

Parse error: parse error in /home/httpd/html/consumables.html on
line 290

when I try to run it. The script doesn't run because of the parse
error

    $orderSQL=~s/TOTAL/$or_total/;

$orderSQL is a string containing a number of SQL statements with
the placeholder &total; and $or_total has a value of '695.76'

     % perl -wle '$or_total="695.76"; \
                  $orderSQL="TOTAL"; \
                  $orderSQL=~s/TOTAL/$or_total/; \
                  print $orderSQL'
     695.76

The error is somewhere else.

-- fxn

I see your point, but if I comment out the line the script works fine.
I've not manages to fix it, but have re-structured the script so it
works differently but does the job.

Yes, but the working assumption is that the code is broken, not the parser. So I would try to be sure I understand where's the problem. Otherwise, seeing it just disappear by blind code manipulation, you cannot be sure the program is not still broken.

-- fxn


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to