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);
ihb
In reply to Re: Re: Functions in Perl
by ihb
in thread Functions in Perl
by bluethundr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |