Basically you want to give each pattern a specific id, right?
So why don't you use a second hash that gives you the position in @perm for each pattern. Since @perm is fixed this hash is generated once and then available for the rest of the scripts runtime
In reply to Re^3: counting instances of one array in another array
by jethro
in thread counting instances of one array in another array
by jsmagnuson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |