in reply to Re^2: How can I expand my substring?
in thread How can I expand my substring?
The "1" has significance, in the sense that it is the loop body. You could rewrite my code as:
while( $string1 =~ s/B-/BB/ or $string1 =~ s/-B/BB/ ) { # Replacement already happened in the while condition };
There are other ways, but I find this approach to be closest to your description.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How can I expand my substring?
by Anonymous Monk on Jun 30, 2014 at 12:10 UTC | |
by Corion (Patriarch) on Jun 30, 2014 at 12:17 UTC | |
by Anonymous Monk on Jun 30, 2014 at 12:24 UTC | |
by Corion (Patriarch) on Jun 30, 2014 at 12:33 UTC | |
by Anonymous Monk on Jun 30, 2014 at 12:34 UTC | |
by Anonymous Monk on Jul 22, 2014 at 13:04 UTC | |
by Corion (Patriarch) on Jul 22, 2014 at 13:11 UTC | |
by Anonymous Monk on Jul 22, 2014 at 13:59 UTC | |
| |
|
Re^4: How can I expand my substring?
by Anonymous Monk on Jun 30, 2014 at 12:07 UTC |