$path=~ s{ /log/ .* \z}{/xyz/}xms; [download]
In reply to Re^5: Manipulating directory paths by ikegami in thread Manipulating directory paths by pp