Hola Monks...
I was looking at the qr// operator the other day, and came across this, from perlop:
The result may be used as a subpattern in a match: $re = qr/$pattern/; $string =~ /foo${re}bar/; # can be interpolated in other patter +ns $string =~ $re; # or used standalone $string =~ /$re/; # or this way
And I came to the conclusion that I had no clue what was going on in the /foo${re}bar/ snip. Why the {}'s in this case? Not repetition, I assume. And why is '$' outside of them? Why is 're' not treated as a fixed string? If someone could spell out what exactly this means, I would appreciate it.
Confusedly...
~evan
In reply to /foo${re}bar/ by eweaverp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |