Don't ask to ask, just ask | |
PerlMonks |
Stuck in my final step of code using array of arraysby Anonymous Monk |
on Mar 02, 2014 at 16:02 UTC ( [id://1076717]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks! I have a file in the following format:
I have generated an array of arrays from this file:
which prints:
My question is the following: Some of the codes (like PF03797 for example) are different than the rest for the scope of my program. What I need to do is, when I find such codes (I have them stored in a hash), then I would need to find the elements in the array of arrays that are before and after them (if any) and then print the range from the end of the preceding element until the start of the subsequent one. For example, in the case of A0AWZ5 that I have listed in my example, I would need to print, since PF03797 is indeed one of these "important" codes, the range from 548 (the end of the preceding element in the array of arrays until the end (since there is no subsequent element in this case).
Back to
Seekers of Perl Wisdom
|
|