Use the g-modifier of the substitution operator. For example: If
thenmy $string = 'ACOCOB';
prints AC/OC/OB$string =~ s(CO)(C/O)g; print "$string\n";
In reply to Re: How to insert a "/" within a string?
by rovf
in thread How to insert a "/" within a string?
by rsvp1920
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |