in reply to replacing $` with ordinary capturing in global substitutions

s<(\w+)/><@{[substr $_, 0, $-[0]]}$1\n>g;