s/x/"o" x 5/e is rather inefficient, specially
if you do it in a loop. It's inefficient because you ask Perl
to execute something that always gives the same
result.
s/x/ooooo/ or
$o = "o" x 4; ...; s/x/$o/ are more efficient.
s///e is interesting if the result of the code in the replacement part depends on the match. s/(\d+)\s*\+\s*(\d+)/$1 + $2/e; for instance.
Abigail