error: lvalue required as left operand of assignment error: lvalue required as unary '&' operand #### #!/usr/bin/perl -- use strict; use warnings; use Inline C => Config => BUILD_NOISY => 1, CLEAN_AFTER_BUILD => 0; use Inline 'C' => <<'CODE', NAME => 'xiaoyafeng'; int ddd(SV* x){ SvUTF8_off(x); SvGROW(x,10); char*buff = SvPV_nolen(x); *buff = "dddddd\n"; printf("SV* x is %p \n", x); printf("SvPV(x) is %p \n", SvPV_nolen(x)); printf("string buff is %p \n", buff); SvCUR_set(x, 10); SvSETMAGIC(x); return 0; } CODE use Devel::Peek qw/ Dump /; my $x = ""; Dump $x; ddd($x); Dump $x; exit( 0 ); __END__ SV = PV(0x3f7a8c) at 0x99bca4 REFCNT = 1 FLAGS = (PADMY,POK,pPOK) PV = 0xf46a04 ""\0 CUR = 0 LEN = 12 SV* x is 0099BCA4 SvPV(x) is 00F46A04 string buff is 00F46A04 SV = PV(0x3f7a8c) at 0x99bca4 REFCNT = 1 FLAGS = (PADMY,POK,pPOK) PV = 0xf46a04 "$\0matched\0" CUR = 10 LEN = 12