use strict; use warnings; sub my_print { my $i = shift; print $i; } foreach my $j (0, 1) { my_print($j); }