Sure, as so often requirements are ambiguous and interpretations vary, that's why I added side notes.
Anyway I like the approach a lot, this pattern is not too often applied.
But I was probably also overmotivated because I understood your code... ;)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re^4: Counting elements in array of cases
by LanX
in thread Counting elements in array of cases
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |