Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Recursive substitution

by JadeNB (Chaplain)
on Nov 10, 2009 at 04:10 UTC ( #806115=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $_ = 'ab';
    s/^(a{1,3})(?=b)/$1a/g; # => $_ = 'aab'
    
  2. or download this
    $_ = 'ab';
    s/^(a{1,3})(?=b)/pos = 0, $1 . 'a'/eg; # still, $_ => 'aab'
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2020-06-03 22:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (29 votes). Check out past polls.

    Notices?