It is actually the 1st letter after the end of the element in the array of arrays that precedes the "wanted" one (i.e. PF03797 in this case).
I had:
0 [ PF12951 421 455 ],
1 [ PF03797 822 1073 ],
2 [ PF12951 515 547 ],
,
so, I need the range between the end of whatever is before PF03797 until the beginning of whatever is after PF03797 (in this case there is nothing, since both PF12951 finish before the position 822 that PF03797 starts). | [reply] [d/l] [select] |
Alright, if I understand well, then it means that your data is not in the right order, the order that you want to use is the order given by the second or third field. The easiest might then be to start by sorting your AoA in accordance with the second field of each sub-array.
| [reply] |
Yes but I have a hash with 90+ elements that are "important", it's not only PF03797 like I posted in the example...
So my question, in essence is:
given my AoA, if I go through it and I discover my "important" code (like PF03797), then find the element in the AoA that is just before it in the sequence (in this case the closest one ends in position 547) and print the range from this position (548) till end end of PF03797 (which I already know of course).
| [reply] [d/l] [select] |