in reply to Re^2: Help in joining these lines
in thread Help in joining these lines

The '\K' and '(?=...)' parts are explained in Lookaround Assertions under "perlre: Extended Patterns".

You can use Regexp::Debugger to see what's happening (step-by-step) as a regex is processed. I find this to be a very useful tool.

— Ken