sub modify_it { $_[0]= 11; } my $x= 10; for my $y ($x) { modify_it($y); } say $x; // $x is now 11