in reply to Back reference in s///g ?
The references $1, etc. refer to expressions in (capturing) parentheses. I think you want this:
$in =~ s/([a-zA-Z])\n([a-zA-Z])/$1\ $2/g; [download]