use strict; use warnings; use feature qw( say ); use Inline C => <<'__EOS__'; void testing(char* s) { s[0] = 'y'; } __EOS__ my $x = "x"; my $y = $x; say "$x-$y"; testing($y); say "$x-$y"; #### x-x y-y <-- Changed both $x and $y #### for (1..2) { my $y = "x"; say $y; testing($y); } #### x y <-- Changed the constant!