sub something { my $i = whatever; ... sub { closure involving $i } } #### for my $i (@some_values) { ... sub { closure involving $i } }