SV* test( SV *a, SV *b ) { SV * c; if(SvREADONLY(a)) { c = newSVsv(a); sv_catsv(c, b); return c; } sv_catsv(a,b); c = newSVsv(a); return c; }