![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Variable-width negative lookbehindby delirium (Chaplain) |
on May 05, 2004 at 17:09 UTC ( [id://350844]=note: print w/replies, xml ) | Need Help?? |
How about the lovely and talented /e?
$string =~ s/(.)X+/$1 eq 'Y' ? YX : $1/eg;
In Section
Seekers of Perl Wisdom
|
|