in reply to Re: Function call inside regexp
in thread Function call inside regexp

The /e is the best option, I think.
But just to mention it, there is another way to do it:
$b =~ s/\:\:/${\(File::Spec->rootdir())}/;
The trick is to use de-reference a refence to a value. You can put almost any expresion inside the ${\( )} and it will be well evaluated.