You probably need to use zero-width look-behind/look-ahead assertions:
$in =~ s/(?<=[a-zA-Z])\n(?=[a-zA-Z])/ /g;
In reply to Re: Back reference in s///g ?
by jwkrahn
in thread Back reference in s///g ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |