12345678910111213
my $count = 0; my $fetch_img = sub { my $item = shift; #arbeite... $count++; }; for my $item (@images) { $fetch_img->($item); } print "Zahl: $count";
1234567
my $count = 0; for my $item (@images) { #arbeite... $count++; } print "Zahl: $count";