It appears to me that each of your triple (X # Y) is a piece of a route with X being the starting point and Y being the end point.
What you seem to have in $array is a long route and a shorter one in $delim.No you seem to want to find regions in $array that give you the same stop on the long route, you got on the short.
So here is my idea:
%start = ( A => [ 0, 1, ], B => [ 4, 6, ], C => [ 2, 5, ], D => [ 3, ], } %end = { A => [ 0, ], B => [ 3, 5, ], C => [ 1, 4, ], D => [ 2, ], E => [ 6, ], );
In reply to Re: Identifying Delimited Regions of an Array
by Skeeve
in thread Identifying Delimited Regions of an Array
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |