$allLinks =~ s¦^[^/](.)¦/$1¦g;
But that *replaces* the first character with a slash. And it only operates on the first line, even though I used the "g" option.
As an alternative I figured I could split the string into an array, then process each item in the array, and then join the array elements back into a string, but that seems like a duct-tape approach. I'd like to use the quick and professional version if possible.
Thanks for your help, -MBJ-
One, I didn't have what I wanted to match in the parentheses, as you said.
Two, I didn't have the /m flag. I'd never seen that before, so I just looked it up, and found that it's the magic flag that makes a regular expression operate on multiple lines. Very handy. I thought /g was enough to do that (who would have thought that global doesn't really mean global), but now I know better.
adni18, you don't have to use a slash in a substitution expression. You can use any character you want. I use the bar character instead of a slash when the expression itself contains a slash, to make the expression easier to read.