in reply to Re: Functions in Perlin thread Functions in Perl
Or this can be a good example of a closure
my $printer = do { my $c; sub { print ++$c, ": $_\n" for @_; } }; $printer->(@stuff_to_print); $printer->(@more); [download]
ihb