Hi Eric,

in your example there's two simple options

1) use single quotes
print "   <!--#include file="titlepic.shtml"-->\n";

2) escape you internal quotes
print "   <!--#include file=\"titlepic.shtml\"-->\n";

If you wish to include variables in the print statement you would have 
to use example two as the single quotes in example 1 mean 'print 
litterally' what I say, while the double quotes in example 2 mean 
'interpret and print'.

Hope this helps.

Gary


On Wednesday 25 April 2001  1:12 am, Eric Hanigan wrote:
> Hello,
> Real greenhorn here. I'm modifying a discussion board script which
> writes to an html file. I'm trying to insert the following into the
> file:
>
>     <!--#include file="titlepic.shtml"-->
>
> So, I put this in the script:
>
>     print "   <!--#include file="titlepic.shtml"-->\n";
>
> I'm getting syntax errors. I'm pretty sure it's from the quote
> character before the word titlepic (that's what I think the error log
> on the server is telling me). That quote is closing off an argument,
> right?
>
> How do I nest the quoted material within the other quotes? I've tried
> qq and \Q amongst other things, but I don't know what I'm doing.
>
> Thanks for any tips,
>
> Eric

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 
    

Reply via email to