Hi Jan,
thank you for the great work you do.
The q* operators ( q, qq, qx, qw) work (as often in perl) in a little strange
way. And I understand it can be quite complicated in a text editor.
Basically you put the q and then (after eventually a space) a special character.
That character is used also as closing character of the quoted text.
And, yes, that character can be parentheses '( )', but also square brackets '[
]', braces '{ }', slashes '/ /', even a exclamation mark '! !'.
The following document, for example, uses the slash.
https://perldoc.perl.org/perlop.html#Quote-Like-Operators
So, these expressions are all equivalent and work in perl.
q {` # ~ ! @ $ % ^ & * ( ) _ - + = \ | [ ] { } ' " ; : / ? . < > , }
q (` # ~ ! @ $ % ^ & * ( ) _ - + = \ | [ ] { } ' " ; : / ? . < > , )
q /` # ~ ! @ $ % ^ & * ( ) _ - + = \ | [ ] { } ' " ; : \/ ? . < > , /
q !` # ~ \! @ $ % ^ & * ( ) _ - + = \ | [ ] { } ' " ; : / ? . < > , !
(Note that to make it work in perl I had to escape the / or the ! in the last
two expressions)
If you use a character different than { the braces matching works. But if you
use the braces, because of the # in the list of characters, it fails.
This example is different than the first, here the braces matching fails because
of the comment character (#).
I hope this helps. If you need any help let me know.
Thank you
--
<https://forum.pspad.com/read.php?2,66321,69884>
PSPad freeware editor https://www.pspad.com