Sep 7, 2014, 5:39 PM
Post #2 of 3
Re: [terrykhatri531] Simple question - How to add comments within a double-quoted string
[In reply to]
Please check the documentation for quote and quote-like operators.
You must escape using a backslash the character that you chose for the deliminator within the string. In your case, the deliminator you chose is !, therefore you must escape all !'s that occur in the string with \!. The compiler assumes that the quote starts at the deliminator then ends when it reaches the next non escaped deliminator.
- Choose a deliminator that doesn't occur or occurs less often within the string such as ~.
- Use a here-document:
string goes here
- Don't mix HTML with Perl. Use a template instead.
(This post was edited by Zhris on Sep 7, 2014, 5:46 PM)