in reply to Compiling your regexes (boo)
in thread Wx Regex Tester

You could still use the precompiled regexp to do that, if that makes things better. :) $repltext on the other hand, should of course not be compiled.
$testtext2 =~ s/$regexp/$repltext/
Still haven't been home and awake long enough simultaneously... but I'll get there, if nothing else at the weekend. Stupid friends wanting to do non-nerd stuff. And outside! Where there is light from non-monitor sources! Heathens... :)
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.