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.
In reply to Re^3: How can I expand my substring?
by Corion
in thread How can I expand my substring?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |