to only get failure.'foo' =~ /(?'name'(?=o)(\w+))(?{print $name})/ # or 'foo' =~ /(?'name'(?=o)(\w+))(?{print $-1})/ Number found where operator expected at (eval 23)
In reply to Code expressions in regex refer to the regex group captured, by name / relative by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |