When using qqx, the x can be replaced with a non-paired type of character, such as the tilde (~), in which case the SAME character is used to close it. You can also use a PAIRED type of character, such as parens, square brackets, curly brackets or angle brackets, in which case you MUST use the left one to open the qqx and the right one to close it. There is no difference in the effect of the qqx, just a slight difference in syntax. You can even use a non-printable character to surround the literal in a qqx, such as: qq\002This literal can contain almost anything!\002;
qqx works just like normal quotes in that it encloses a literal expression and variables within the expression ARE interpolated. The advantage is that you can use normal quotes inside a qqx expression without having to escape them, ie
Code:
qq(She said, "Hi!"}
;
I've never seen qqx used with multi-line literals like you showed above, only the "here-doc" form <<LABEL.
Check out the perl docs page perlop under "Quote and Quotelike Operators".
Note also that the <<LABEL form can use any value for the label, as long as the SAME value is used to end it, without a semicolon on the ending label and the ending label MUST start in column 1.
Tracy Dryden
tracy@bydisn.com
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.