Sunday, June 8, 2014

How do you replace either of the words with a new word?

if ($line =~ m/O(RC|BR)/) {
$line =~ s/$&/\n\n$&/ig;
}

will replace either ORC or OBR with "\n\nORC" or "\n\nOBR".

No comments :