Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Recursive substitution

by JadeNB (Chaplain)
on Nov 10, 2009 at 04:10 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-24 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found