int len; char* pBeg= SvPV(...,len); char* pSrc= pBeg + len; char* pDst= SvPV(....) + len; while( pBeg <= pSrc ) { if( ! *pDst ) { *pDst= *pSrc; } --pSrc; --pDst; }