which isn't trivial within strings/regexes.
the "@{[...]}" trick works but is IMHO a bit oversized for this task.
DB<109> use constant STR => 1..3 DB<110> qr/[@{[ STR ]}]/ => qr/[1 2 3]/
thats not interpolation anymore but inline eval.
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re^5: Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ^]/
by LanX
in thread Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ^]/
by madM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |