in reply to simplifying substitution
Since you are using at least Perl 5.10, you could do
which retains everything before the \K.