sub noleak (&$) { my $cr=shift; $_[0]=$cr } my ($start,$end)=(1,20); my @a; for (0..9) { $start++; noleak {$start,$end} my $a; push @a,$a; print $a }