And don't forget, since you're referring to a capture while still in the regex, it hasn't set $1 yet, so you have to use \1 instead:
(?{ print $1, "\n" })would need to be
(?{ print \1, "\n" })unless there's something special about the codeblock I'm not aware of?
Update: Strike that, reverse it, elusion's correct. Make sure you don't do anything silly like using \1 instead of $1 ;-)
In reply to Re: Re: regex (?{CODE}) question
by Ferret
in thread regex (?{CODE}) question
by ctgIT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |