perl: use newSVpvn for variable length strings.