in reply to Re: regex (?{CODE}) question
in thread regex (?{CODE}) question
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 ;-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: regex (?{CODE}) question
by elusion (Curate) on Aug 01, 2002 at 19:37 UTC | |
by ctgIT (Initiate) on Aug 01, 2002 at 19:53 UTC | |
by elusion (Curate) on Aug 01, 2002 at 19:59 UTC |
In Section
Seekers of Perl Wisdom