sub counter { my $start_value = shift; return sub { return $start_value++; } }