in reply to Re^4: Substitution with regex and memory consumptionin thread Substitution with regex and memory consumption
{ $s = ".....X....."; $s =~ s/X/Y/; $x = eval q{ "[ $`$& $' ]" }; } [download]
Dave.