| [reply] [d/l] [select] |
Non-bracketing delimiters use the same character fore and aft, but the
four sorts of brackets (round, angle, square, curly) will all nest,
which means that
q{foo{bar}baz}
is the same as
'foo{bar}baz'
and it still goes on a bit. This is the perlop for 5.6.1. Older versions of this document aren't as elaborate, though they still mention that these pairs indeed do nest, at least up to the oldest version I found, v.5.004_05. | [reply] [d/l] |
As japhy pointed out some time back the following also work
s]...]...];
s)...)...);
s}...}...};
It works for al qq constructs. If you're interested peruse Japhys more recent nodes.
Yves / DeMerphq
---
Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)
| [reply] [d/l] |
I know, I've already gotten some mileage out of it in a recent obfuscation of mine. Anything that makes the syntax highlighter choke has to be a step in the right direction for that sort of thing.
| [reply] |
Some syntax highlighters also have a distaste for constructs qq}like this}. And find one for me that will work properly after you apply Bleach. :-)
| [reply] [d/l] |
It isn't limited to the regexps, it is all the "Quote and Quote like Operators" - follow the link for at least some details on what is allowed and what is not.
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue. | [reply] |
Hallelujah!
For some reason I assumed ?? would work same as //, little realizing that it is its own operator.
I just couldn't figure out why it only responded to the first instance, until I ran into it through your link...
10x,
---perchance
| [reply] [d/l] |
// is an m-less form of m//. This means that m?? is the functional equivalent. Or m!!, m>> or even m**.
Considering // will soon be an operator, things are sure going to get interesting.
Update:
What Dog and Pony is talking about is this bit:
If "/" is the delimiter then the initial m is optional. With the m you can use any pair of non-alphanumeric, non-whitespace characters as delimiters. This is particularly useful for matching path names that contain "/", to avoid LTS (leaning toothpick syndrome). If "?" is the delimiter, then the match-only-once rule of ?PATTERN? applies. If "'" is the delimiter, no interpolation is performed on the PATTERN.
I find that I use hash-marks as a replacement more often than not(m##), or, on those occasions where that's no good, excamation marks (m!!). Now I remember why I don't use '?'.
| [reply] [d/l] [select] |