for (0 .. $#name) { $phylo =~ s/\Q$name[$_]\E/$_+1/e; } [download]
Cheers.
In reply to Re: Word matching in string by Joost in thread Word matching in string by Jaya