go ahead... be a heretic | |
PerlMonks |
Re: Variable matching on a regexby almut (Canon) |
on Jun 17, 2010 at 10:02 UTC ( [id://845178]=note: print w/replies, xml ) | Need Help?? |
Not an answer to your question, but
would more naturally be written as
which is the same as
(The temporary assignment of $_ to $d1 in your variant doesn't do any harm, but doesn't help much either.) However, AFAIK, there is no way to do it, except if you implement it yourself with (?{...}) code or some such (as shown further down) — which of course ruins any elegance the approach might have had otherwise.
In Section
Seekers of Perl Wisdom
|
|