Do you know where your variables are? | |
PerlMonks |
how to replace a matched pattern in a string with a different pattern of same length?by BhariD (Sexton) |
on Jun 19, 2011 at 13:16 UTC ( [id://910414]=perlquestion: print w/replies, xml ) | Need Help?? |
BhariD has asked for the wisdom of the Perl Monks concerning the following question: I have the following code to find the occurrence of first longest substring of 1's
If I want to replace that longest substring ($1) found with a different number lets say '2' in the original $string, i.e. '00222200110' instead of '00111100110', how should I do that?
Back to
Seekers of Perl Wisdom
|
|