Quoting HOP, [prototyping means that]:
when we write this:
Iterator { ... }
Perl behaves as though we had written:
Iterator(sub { ... })
It allows the passing of a code reference to the Iterator subroutine, and is elsewhere compared to map { ... } @array and grep { ... } @array.
In reply to Re^5: "a bit of sugar "(HOP)
by hbm
in thread "a bit of sugar "(HOP)
by Wiggins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |