in reply to SOLVED: performance of repeated "$samevareachtime=~ s/etc/etc" idiom

I wonder how well your understanding of Perl is. Assuming regex matches in $acertainvariable, and replacement is different from what's matched by regex, the line in question will change $acertainvariable.

I cannot imagine how you intent to replace a sequence of substitutions by an if or switch (the latter is called given in Perl). Perhaps you can enlighten us with an example?

As for performance, mini optimizations aren't as useful as you may think. Getting your program working correctly is far more important.