Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Recursive substitution

by bobf (Monsignor)
on Nov 10, 2009 at 04:27 UTC ( #806118=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $s = 'ab';
    my $pat = qr/^(a{1,3})(?=b)/;
    ...
    {
        $s =~ s/$pat/$1a/g;
    }
    
  2. or download this
    my $s = 'ab';
    my $pat = qr/^(a{1,3})(?=b)/;
    
    do{ $s =~ s/$pat/$1a/g } while $s =~ m/$pat/;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://806118]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-07-23 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (137 votes), past polls