for my $i (1..3) { my $str = "$i\n"; push @d, sub { print $str }; }